email testing code

  • Thread starter Thread starter choihead
  • Start date Start date
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);
//}
 
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
 
Back
Top