Hi,
I created a clone webpart for BIZFORM and am trying
to use this coed to send an email:
protected void viewBiz_OnAfterSave()
{
CMS.EmailEngine.EmailMessage msg = new CMS.EmailEngine.EmailMessage();
msg.From = "mymail@domain.com"; // use valid e-mail
msg.Recipients = "myEmail@gmail.com"; // use valid e-mail getEmail();//
msg.Subject = "Cagan Form - Submit your suggestions";
msg.Body = "The value of the FirstName field: "
+ CMS.GlobalHelper.ValidationHelper.GetString(
this.viewBiz.BasicForm.DataRow["Name"], "N/A");
CMS.EmailEngine.EmailSender.SendEmail(msg);
// lblConfirmationMessage.Text = "The e-mail has been sent.";
}
haven't received any emails.
I have setup SMTP throw -> site manager -> settings ->E-mails.
Is there something wrong with the code?
Do I need to setup anything else because sending email directly from code?
Thanks