Hi All,
I need send e-mail through the form.
I tried this:
---------------------------------------------------
DateTime dt = DateTime.Now;
String sMsg = "<p><font face='Verdana' size='1'>Trinity Systems - Comprar -
Private Label Control - " + dt.Day + "/" + dt.Month + "/" + dt.Year +
"</font></p>" + "<hr color='#C0C0C0' align='left' size='3'>" + "<br> Nome:"
+ TextBoxNome.Text + "<br>E-mail:" + TextBoxEmail.Text;
SmtpMail.SmtpServer = "SMTP.TRINITYSYSTEM.NET.NETSOLMAIL.NET";
MailMessage mail = new MailMessage();
mail.BodyFormat = MailFormat.Html;
mail.To = "co*****@trinitysystems.com.br";
mail.From = TextBoxEmail.Text.Trim();
mail.Subject = "Trinity Systems - Comprar - Private Label Control";
mail.Body = sMsg;
try
{
SmtpMail.Send(mail);
}
catch(System.Exception ex)
{
Response.Write(ex.Message);
Response.Redirect("http://www.trinitysystems.net/error/default.aspx?id=TS001&msg="
+ ex.Message);
}
mail = null;
Response.Redirect("success.htm");
---------------------------------------------------
But I receive this message of server: --> Could not access 'CDO.Message'
object
How to correct this?
Have other way to send mail?
-----------------
ASP.NET 1.0
Windows XP SP2
VisualStudio 2003
Thanks