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
‘Update the CDOSYS Configuration
Set objCDOSYSMail.Configuration = objCDOSYSCon
objCDOSYSMail.From = “email@example.com”
objCDOSYSMail.To = “firstname.lastname@example.org”
objCDOSYSMail.Subject = “Test mail”
objCDOSYSMail.TextBody = “Test Mail”
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>”
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.