Penhall
Perch
This is bugging the hell out of me. I am trying to send an email using System.Net.Mail
It sends fine to email accounts hosted @ jodohost but errors when sending to anything outside the jodo network. The error I get is: Mailbox name not allowed. The server response was: sorry, that domain isn't allowed to be relayed thru this MTA (#5.7.1)
Basically, just testing with a button and the click code of:
Web Config is setup as
Anythoughts before I pull what's left of my hair out.
Thanks
It sends fine to email accounts hosted @ jodohost but errors when sending to anything outside the jodo network. The error I get is: Mailbox name not allowed. The server response was: sorry, that domain isn't allowed to be relayed thru this MTA (#5.7.1)
Basically, just testing with a button and the click code of:
Code:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Message As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage()
Dim Smtp As New Net.Mail.SmtpClient()
Dim SmtpUser As New System.Net.NetworkCredential()
Dim TOName As String = "Some Name"
Message.From = New Net.Mail.MailAddress([EMAIL="[email protected]"][email protected][/EMAIL], "Jodohost hosted account")
Message.To.Add(New Net.Mail.MailAddress("[email protected]", TOName))
Message.IsBodyHtml = True
Message.Subject = "Test Email ASPX"
Message.Body = "This is a friggin test"
Smtp.UseDefaultCredentials = True
Smtp.DeliveryMethod = Net.Mail.SmtpDeliveryMethod.Network
Try
Smtp.Send(Message)
EmailStatus.Text = "Success"
Catch ex As Exception
EmailStatus.Text = ex.Message.ToString
Finally
End Try
End Sub
Web Config is setup as
Code:
<system.net>
<mailSettings>
<smtp from="[email protected]">
<network host="mail.jhhostedsite.com" password="properpassword" port="25" userName="[email protected]"/>
</smtp>
</mailSettings>
</system.net>
Anythoughts before I pull what's left of my hair out.
Thanks