[.net] SmtpSend

Started by
1 comment, last by coolblue 17 years, 2 months ago
Does anyone have any code that sends an email via smtpclient.send that they KNOW sends successfully to Hotmail accounts (I really need this code to have sent actual emails to hotmail accounts).
Advertisement
This code works for me. I tested it.

Make sure that your servers are setup correctly. (Is relay restrictions turned on for your smtp server, for example?)

Make sure that you give hotmail enough time to virus check your email before deciding that it never arrived. Make sure you give hotmail enough time to propogate your sent message to one of the thousand mail servers that you could be on. (This amounted to about 5 minutes or less for me.)

  // My isp email server is: pop.sttl.qwest.net  // If you want to send mail from your machine at localhost then it must somehow be forwarded to your isp mail server.      System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient("pop.sttl.qwest.net");      System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage("dude@piratetoystore.com", "piratetoys@hotmail.com", "Test Mail Subject", "Test Mail Body");      client.Send(msg);

It didn't work for Hotmail but it did for yahoo.

I have changed your server to localhost but do I need to put this through a special smtp server? I am on a host and therefore I want to send from name@host.com not my isp.

This topic is closed to new replies.

Advertisement