Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Username: noreply@domain.com
- Password: password123
- Incoming Server: mail.domain.com (IMAP Port: 993, POP3 Port: 995)
- Outgoing Server: mail.domain.com (SMTP Port: 465)
- MailDefinition md = new MailDefinition();
- md.From = "noreply@domain.com";
- md.IsBodyHtml = true;
- md.Subject = "subject";
- MailMessage mm = md.CreateMailMessage("user1@gmail.com", null, "Some Text", new System.Web.UI.Control());
- mm.From = new MailAddress("noreply@domain.com", "System Name");
- SmtpClient smtp = new SmtpClient();
- smtp.UseDefaultCredentials = false;
- smtp.Credentials = new NetworkCredential("noreply@domain.com", "password123");
- smtp.Host = "mail.domain.com";
- smtp.Port = 465; //tried for 25, 587
- smtp.EnableSsl = true;
- smtp.Timeout = 40000;
- smtp.Send(mm);
- <system.net>
- <mailSettings>
- <smtp deliveryMethod="Network" from="noreply@domain.com">
- <network host="mail.domain.com" port="465" userName="noreply@domain.com" password="password123" defaultCredentials="false" enableSsl="true" />
- </smtp>
- </mailSettings>
- </system.net>
- Port 25: Mailbox unavailable. The server response was: Error458 block
- Port 26: Mailbox unavailable. The server response was: Error458 block
- Port 465: The operation has timed out
- Port 587: Mailbox unavailable. The server response was: Error458 block
Add Comment
Please, Sign In to add comment