marlatimcom
01-30-2005, 03:38 AM
Hi all,
I have the following email code and it is not sending an email. Any of you see what I am missing? Thanks in advance.
MailMessage mailmessage = new MailMessage();
string body = "this is the body";
body = body.Replace("\n", "\r\n");
mailmessage.To = "thisperson@comcast.net";
mailmessage.From = "this website";
mailmessage.Subject = "Register Request";
mailmessage.BodyFormat = MailFormat.Text;
mailmessage.Body = body ;
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send(mailmessage);
I have the following email code and it is not sending an email. Any of you see what I am missing? Thanks in advance.
MailMessage mailmessage = new MailMessage();
string body = "this is the body";
body = body.Replace("\n", "\r\n");
mailmessage.To = "thisperson@comcast.net";
mailmessage.From = "this website";
mailmessage.Subject = "Register Request";
mailmessage.BodyFormat = MailFormat.Text;
mailmessage.Body = body ;
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send(mailmessage);