Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Scheduling Newsletters View modes: 
User avatar
Member
Member
K-Guy - 1/23/2011 12:02:38 PM
   
Scheduling Newsletters
I would like to set up a newsletter so that...

1. It sends an email to any new subscriber immediately
2. It automatically sends a different email to the subscriber 1 week later

Is there a way to accomplish this?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/28/2011 3:57:03 AM
   
RE:Scheduling Newsletters
Hi,

1) To achieve this, you will need to modify the newsletter subscription web part and right after the registration you will send the message using the API:

CMS.EmailEngine.EmailMessage msg = new CMS.EmailEngine.EmailMessage();
msg.From = "Somebody Surname <somebody@domain.com>"; // use valid e-mail
msg.Recipients = "mail@mail.com"; // use valid e-mail
msg.Subject = "Custom e-mail";
msg.Body = "Text in the body ";
CMS.EmailEngine.EmailSender.SendEmail(msg);

2) for this, you need to create a custom scheduled task which will go through the subrscribers and send the message as you need to.

Best regards,
Juraj Ondrus