Home Code ASPMail not working on Planet Online hosted website

ASPMail not working on Planet Online hosted website

1623
0

A client noticed they weren’t receiving any more emails from their website form so I tested out the ASPMail function and it was throwing an error:

Mail send failure. Error was Cannot create file

This error is due to an issue with the TMP or TEMP directory on your IIS server.  Refer here for more details.

I reported the issue to Planet Online’s customer service, but they didn’t get back to me in a timely manner so I setup CDO instead.  Edit the code below for your environment just like you had your ASPMail setup:

<%
set objCDOSYSMail = Server.CreateObject(“CDO.Message”)
set objCDOSYSCon = Server.CreateObject(“CDO.Configuration”)
‘Out going SMTP server
objCDOSYSCon.Fields(“http://schemas.microsoft.com/cdo/configuration/smtpserverport”)= 25
objCDOSYSCon.Fields(“http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout”)= 60
objCDOSYSCon.Fields.Update
‘Update the CDOSYS Configuration
Set objCDOSYSMail.Configuration = objCDOSYSCon
objCDOSYSMail.From = “some-name@abc.com”
objCDOSYSMail.To = “xyz@abc.com”
objCDOSYSMail.Subject = “Test mail”
objCDOSYSMail.TextBody = “Test Mail”
objCDOSYSMail.Send
Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing
If Err <> 0 Then
Err_Msg = Err_Msg & “<li>Your request was not sent due to the following error: “& Err.Description & “</li>”
End if
%>

Note: Linefeeds have to be inserted into the body as “\r\n”.  If you put in “\n” alone then you will break the message and it will get stuck in the outbound queue.

Refere here for more details on setting up CDO script.

Previous articleM5312 emachine laptop wireless internet not working
Next articleWhich website visitors can’t Google Analytics track?

LEAVE A REPLY

Please enter your comment!
Please enter your name here