kentico_michal
-
9/21/2011 2:16:43 AM
RE:Set email template 'from display name' from within API
Hello,
I suppose you are using the EmailSender.SendEmailWithTemplateText method:
public static void SendEmailWithTemplateText( string siteName, EmailMessage message, EmailTemplateInfo template, MacroResolver resolver, bool sendImmediately, string encoding )
If so, it is possible to set the message.From property to any value you need. However, if the email template has any value specified in the From property [Site manager -> Development -> E-mail templates -> edit a template -> From], then this value is used instead of the one specified in the message.From property.
So, you need to leave the From field in email template settings empty so that the message.From value was applied.
Best regards, Michal Legen
|