I have the code below, which works fine for sending internal email. Works on a PC.
But for external email, I get the message:
Mailbox unavailable. The server response was: 5.71. unable to relay
I've searched online, but the solutions seem to involve making changes on the exchange server. Is there a way I can add settings through code to fix this issue?
Dim smtp As New SmtpClient("mymailservername")
Dim mailClient As New MailMessage()
.From = New MailAddress(TM_FROM)
.Subject = stSubject
.Body = stBody
'send the message