Hello All, I have a winforms app that uses System.Net.Mail to send an e-mail message. When I run this it throws:
System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: 5.7.1 Unable to relay
I believe this is caused by Exchange which will not allow relaying. At first I thought the way around this was to use the following:
NetworkCredential nc = new NetworkCredential("uname", "password");
sc.DeliveryMethod = SmtpDeliveryMethod.Network; sc.UseDefaultCredentials = true;
sc.Credentials = nc;
This does not work. My question is; how do I get around this with changing the settings in Exchange to allow relaying?
Thanks
"The beatings will continue until morale improves
System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: 5.7.1 Unable to relay
I believe this is caused by Exchange which will not allow relaying. At first I thought the way around this was to use the following:
NetworkCredential nc = new NetworkCredential("uname", "password");
sc.DeliveryMethod = SmtpDeliveryMethod.Network; sc.UseDefaultCredentials = true;
sc.Credentials = nc;
This does not work. My question is; how do I get around this with changing the settings in Exchange to allow relaying?
Thanks
"The beatings will continue until morale improves