What's wrong with this code then? It's basically on a thank
you page. The content of the form is being entered in to a database
fine, but the email Jmail email is not being sent even on the most
basic of info, infact, it is kicking up an error with the code I
have below. Here is the error:
jmail.Message error '8000ffff'
The message was undeliverable. All servers failed to receive
the message
/thankyou.asp, line 87
and here is the code:
<%
Dim strBody
Dim strCustBody
Dim strServer
Dim strSMTPServer
strServer =
Replace(request.servervariables("SERVER_NAME"),"www.","")
strSMTPServer = "smtp." & strServer
Set objMail = Server.CreateObject("JMail.Message")
objMail.AddRecipient "subs@website.com"
objMail.Subject = "TRIAL APPLICATION " &
Request.Form("name")
objMail.From = "web@website.com"
' Creating the body here
strBody = strBody & vbCrLf & "**** TRIAL APPLICATION
****"
strBody = strBody & vbCrLf & " "
strBody = strBody & vbCrLf & "Date & Time
Submitted:" & Date() + Time()
strBody = strBody & vbCrLf & " "
strBody = strBody & vbCrLf &
"--------------------------------------------"
strBody = strBody & vbCrLf & "Delegate details"
strBody = strBody & vbCrLf & " "
strBody = strBody & vbCrLf & "Name : " &
Request.Form("fld_firstname")
strBody = strBody & vbCrLf & "Name : " &
Request.Form("fld_lastname")
strBody = strBody & vbCrLf & "Title : " &
Request.Form("fld_title")
strBody = strBody & vbCrLf & "Company : " &
Request.Form("fld_companyname")
strBody = strBody & vbCrLf & " "
strBody = strBody & vbCrLf & "Address :"
strBody = strBody & vbCrLf &
Request.Form("fld_companyaddress")
strBody = strBody & vbCrLf & "Country: " &
Request.Form("fld_country")
strBody = strBody & vbCrLf & " "
strBody = strBody & vbCrLf & "Telephone : " &
Request.Form("fld_telephone")
strBody = strBody & vbCrLf & " "
strBody = strBody & vbCrLf & "Email : " &
Request.Form("fld_email")
strBody = strBody & vbCrLf & " "
strBody = strBody & vbCrLf &
"--------------------------------------------"
strBody = strBody & vbCrLf & " "
strBody = strBody & vbCrLf & "Username : " &
Request.Form("fld_username")
strBody = strBody & vbCrLf & " "
strBody = strBody & vbCrLf & "Password : " &
Request.Form("fld_password")
strBody = strBody & vbCrLf & " "
strBody = strBody & vbCrLf &
"--------------------------------------------"
objMail.Body = strBody
if not objMail.Send(strSMTPServer) then
Response.write "<pre>" & msg.log &
"</pre>"
end if
Set objMail = Nothing
Set objCustMail = Server.CreateObject("JMail.Message")
objCustMail.AddRecipient Request.Form("fld_email")
objCustMail.Subject = "Your Subscription"
objCustMail.from = "subs@website.com"
'Creating customer body here
strCustBody = strCustBody & vbCrLf & "Dear: " &
Request.Form("fld_firstname")
strCustBody = strCustBody & vbCrLf & " "
strCustBody = strCustBody & vbCrLf & "Thank you for
taking a trial!"
strCustBody = strCustBody & vbCrLf & " "
strCustBody = strCustBody & vbCrLf & "The Trial
& Subscriptions Team"
strCustBody = strCustBody & vbCrLf & " "
strCustBody = strCustBody & vbCrLf &
"--------------------------------------------"
strCustBody = strCustBody & vbCrLf & "Trial
submitted:" & Date() + Time()
objCustMail.Body = strCustBody
if not objCustMail.Send(strSMTPServer) then
Response.write "<pre>" & msg.log &
"</pre>"
end if
Set objCustMail = Nothing
%>