Advertisement
Guest User

Untitled

a guest
Sep 8th, 2015
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. MailMessage email = new MailMessage();
  2. email.BodyFormat = MailFormat.Html;
  3. email.From = "testing@ppms.in";
  4.  
  5.  
  6. email.To = "ashish@techmagnate.com";
  7. //email.Cc = "tasauwar.ansari@techmagnate.in;";
  8. email.Subject = "Testing";
  9. email.Body = "test";
  10. email.Priority = MailPriority.High;
  11.  
  12.  
  13.  
  14. // End of attachments processing
  15. // Set the SMTP server and send the email
  16. email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", "smtpout.secureserver.net");
  17. email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "25");
  18. email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", "2");
  19. email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
  20. email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "testing@ppms.in");
  21. email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password");
  22. email.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", "false");
  23. SmtpMail.SmtpServer = "smtpout.secureserver.net";
  24.  
  25. SmtpMail.Send(email);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement