Modified Subscription Mail problem

Member since: 2003
 

Hi!

After migrating 4.62 -> 5 CMS2 R2 I have not been able to override the default email values. Before I used "MailFrom", "MailSubject", "MailReadMore" and "MailBody". And so it is at the EPiServer CMS SDK Documentation (R2):

The text for the "Read More..." text is taken from the page property "MailReadMore" on the subscription root.

The subject of the mail is generated from the page property "MailSubject" on the subscription root.

The mail from address generated from the "MailFrom" page property on the subscription root.

However, there is an article at:
http://world.episerver.com/en/Documentation/Items/Tech-Notes/EPiServer-CMS-5/EPiServer-CMS-5-SP1/Configuring-Subscription-in-EPiServer-CMS-5/

It shows:

PropertyDefault valueName of override property
From-addresssubscription@[host]SubscriptionMailFrom
Subjectlanguage specificSubscriptionMailSubject
IntroductionemptySubscriptionMailBody
Link titlelanguage specificSubscriptionMailReadMore

Anyway, neither "MailFrom" or "SubscriptionMailFrom" works for me. Default email is sent away. Please help!

#26526 Dec 10, 2008 9:10
  • Member since: 2003
     

    I've checked the code using .NET Reflector, and it seems like EPiServer looks for those properties on each subscribed page, and not the actual Subscription page. 

    I've reported this as a bug to support.

    #26537 Dec 10, 2008 12:32
  • Member since: 2003
     

    Thank You Mari! Smile 

    But the big question remains: should I use "MailFrom" as it was before and in the CMS5 R2 SDK, or the new "SubscriptionMailFrom"?

    We ar going to online with R2 as soon as this problem is solved... Innocent

    #26541 Edited, Dec 10, 2008 14:10
  • Member since: 2003
     

    You should use SubscriptionMailFrom, SubscriptionMailSubject, SubscriptionMailBody, SubscriptionMailReadMore to override default settings.

    A quick fix is to override the Send() method in the SubscriptionMail class. You can find more information on this subject here.

    #26542 Dec 10, 2008 14:26
  • Member since: 2003
     

    Thank You Mari for helping and giving a valuable tip!

    I moved those properties away from page and made dynamic properties of them. Now the email functions perfect!!! Laughing <- happy me

    #26550 Dec 10, 2008 18:57
  • Member since: 2008
     
    Was this a real bug or is the behaviour to look on each page by design? I couldn't find the bug in the bug tracker to check if it has been fixed in R2 SP1.
    #28088 Feb 19, 2009 10:52
  • Member since: 2007
     

    The bug was closed "as designed". From the history notes:

    This is a changed behavior from 4.62 to CMS 5 and it is by design.

    The comments on the class SubscriptionMail has been updated to be more clear about the behavior.

    For users that wants the same behavior as in 4.62 they can implement their own class implementing EPiServer.Personalization.ISubscriptionHandler. One option is to inherit EPiServer.Personalization.SubscriptionMail and override method Send in where they can construct the mail as they like.

     

    #28094 Feb 19, 2009 15:23
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
Please login to post a reply