Hi
Am struggling with this a bit. I have followed what I think are the correct setup instructions and am getting error "Mailbox unavailable. The server response was: Authentication is required for relay".
My setup and code is as follows:
Am using .Net Framework 4
Web.Config:
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network host="mail.WebSiteLive.net" port="25" userName="myemailaddressregistered" password="mypwd" defaultCredentials="true" />
</smtp>
</mailSettings>
</system.net>
C# Code:
System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient("mail.WebSiteLive.net");
client.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(
"myemail",
"addresstosendto",
"TEST",
"See....");
client.Send(message);
It's probably something obvious. Thanks for any help!
Mark