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/
Anyway, neither "MailFrom" or "SubscriptionMailFrom" works for me. Default email is sent away. Please help!
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.
Thank You Mari!
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...
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.
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!!! <- happy me
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.