Sending email from domain

When I attempt to send email from my contact web page I get the following error message:

“Transaction failed. The server response was: Sorry, this message appears to be spam”

I’m using a valid email address etc. This is on the andrewmckay.co.uk domain.

Andrew

Please send us ticket for this.

After sending a ticket Jodohost kindly responded with a test script which worked fine.

Further investigation of that test script then showed that Jodohost do not appear to be fully supporting System.Net.Mail which I was using. When I switched to System.Web.Mail (which was shown in the JodoHost test script) everything worked fine.

However System.Web.Mail has been deprecated:

System.Web.Mail Namespace | Microsoft Learn

Thus anyone else who has experienced problems with email being sent via their web site might want to check this.

The script that works is based upon the following - this comes from the JodoHost test script:

Sub btn_Click(sender as Object, e as System.EventArgs) If Request.Form("Email") <> "" Then Dim objMail As New MailMessage() objMail.From = "[email protected]" objMail.To = Request.Form("Email") objMail.Subject = Request.Form("Subject") objMail.Body = Request.Form("Message") objMail.BodyFormat = MailFormat.Text SmtpMail.SmtpServer = "localhost" SmtpMail.Send(objMail) Else lblResponse.Text = "Please enter an email address." End If End Sub

Andrew