Sending email from domain

KazMax

Perch
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
 
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.M
Code:
ail 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:

http://msdn2.microsoft.com/en-us/library/system.web.mail(VS.80).aspx

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:

Code:
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
 
Back
Top