Hi Greg,
I was involved with this post a long while ago so I still get the emails.
I have a Windows Hosting Plan with godaddy and it works fine now.
It used to take up to half an hour but these dqays it takes only seconds. Maybe I changed the code along the way.
Anyway, I'll show you what I have and maybe it'll work for you.
It's C#...
In the following, there will be two email addresses mentioned.
My email address, which I'm sending from, which belongs to the domain that it hosted, which I call myemal@mysite.com and the password for this email, which I call "mypassword".
Also, the email address I'm sending the email to, which I'll call rxemail@clientsite.com.
In my web.config file, which is in the root of my application, i.e. same folder as my default.aspx file, I have the following:
<system.net>
<mailSettings>
<smtp>
<network
host="relay-hosting.secureserver.net"
userName="myemail@mysite.com"
password="mypassword" />
</smtp>
</mailSettings>
</system.net>
And the code I use to send the email is as follows:
MailMessage mailMsg = new MailMessage("myemail@mysite.com", "rxemail@clientsite.com");
mailMsg.Subject = "hello from my site to yours";
mailMsg.Body = "bla bla bla" + DateTime.Now.ToString();
mailMsg.IsBodyHtml = false;
SmtpClient smtp = new SmtpClient();
smtp.Host = "relay-hosting.secureserver.net";
smtp.Credentials = new System.Net.NetworkCredential("myemail@mysite.com", "mypassword");
smtp.Send(mailMsg);
Also, if you want to replace the sender's email address with a nice readable name, you can replace the one line:
MailMessage mailMsg = new MailMessage("myemail@mysite.com", "rxemail@clientsite.com");
with these three lines:
MailMessage mailMsg = new MailMessage();
mailMsg.From =
new MailAddress("myemail@mysite.com", "Elvis Presley");
mailMsg.To.Add("rxemail@clientsite.com"
);
Best of luck, let me know how you get on.
Garrett Brennan