Jump to content
  • Advertisement
Sign in to follow this  
coolblue

[.net] SmtpSend

This topic is 4249 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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).

Share this post


Link to post
Share on other sites
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);


Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!