Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > sending email from codd View modes: 
User avatar
Member
Member
eagleag - 7/14/2010 9:38:56 AM
   
sending email from codd
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

User avatar
Member
Member
eagleag - 7/15/2010 3:09:58 AM
   
RE:sending email from codd - SOLVED
thanks. was small issue