Quantcast
Channel: Exchange Server 2013 - Mail Flow and Secure Messaging forum
Viewing all articles
Browse latest Browse all 4169

“5.7.1 unable to relay” when sending from local Exchange account

$
0
0

I have this program that is trying to send an email to an outside address using an internal Exchange account, and I'm getting the following error:

"mailbox unavailable. the server response was 5.7.1 unable to relay"

We have Exchange 2010. I don't understand why, since the account I'm using to send is a local account. Here's my code:

Dim client As SmtpClient = New SmtpClient("webmail.company.com") 
client.DeliveryMethod = SmtpDeliveryMethod.Network
client.UseDefaultCredentials = False
client.Credentials = New NetworkCredential("Service", "pwd", "company")
Dim message As MailMessage = New MailMessage("service@company.com", "someone@outsidecompany.com")
Message.Body = "Test Message"
Message.Subject = "Hello"
client.Send(message)
message = Nothing


Lukasz


Viewing all articles
Browse latest Browse all 4169

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>