hi all,
how do i send an email from a web form app to someone?
is there anything special i need to do to be able to use the SmtpMail class?
i found the below sample code but it's not working for me as I can't seem to be able to use the System.Web.Mail namespace in my program. I'm using VS.Net 2002.
MailMessage myMail = new MailMessage();
myMail.From = "my_email_address";
myMail.To = "email_address_i_want_to_send_email_to";
myMail.Subject = "UtilMailMessage001";
myMail.Priority = MailPriority.Low;
myMail.BodyFormat = MailFormat.Html;
myMail.Body = "<html><body>UtilMailMessage001 - success</body></html>";
SmtpMail.Send(myMail);
actually, what i really want to do is send the contents of a listbox as a email to somebody.
appreciate your help.
thanks!
how do i send an email from a web form app to someone?
is there anything special i need to do to be able to use the SmtpMail class?
i found the below sample code but it's not working for me as I can't seem to be able to use the System.Web.Mail namespace in my program. I'm using VS.Net 2002.
MailMessage myMail = new MailMessage();
myMail.From = "my_email_address";
myMail.To = "email_address_i_want_to_send_email_to";
myMail.Subject = "UtilMailMessage001";
myMail.Priority = MailPriority.Low;
myMail.BodyFormat = MailFormat.Html;
myMail.Body = "<html><body>UtilMailMessage001 - success</body></html>";
SmtpMail.Send(myMail);
actually, what i really want to do is send the contents of a listbox as a email to somebody.
appreciate your help.
thanks!