email testing code

C

choihead

DOes this code works??My server is W2k3 with SMTP in IIS


System.Web.Mail.MailMessage mail = new
System.Web.Mail.MailMessage();
mail.From ="MCMS Web Author";
Posting submittedPosting = (Posting)e.Target;
mail.Subject = submittedPosting.Name + " has been submitted for
approval.";
mail.Body = submittedPosting.Name + " has been submitted for approval. ";
//foreach (User approver in submittedPosting.Approvers())
//{
//mail.To = approver.ClientAccountName + "@youknow.net";
mail.To = "(e-mail address removed)";
System.Web.Mail.SmtpMail.SmtpServer = "localhost";
System.Web.Mail.SmtpMail.Send(mail);
//}
 
N

Nick Malik

you tell us.

In fact, why don't you tell us what kind of problem this code is posing for
you?

Does it appear to work but nothing comes out? Does it produce an error on
your dev server but not your test server (or vice versa)...
Please... share...

--- Nick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top