Skip to main content
Inspiring
July 3, 2008
Question

Jmail Problem

  • July 3, 2008
  • 3 replies
  • 512 views
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
%>
This topic has been closed for replies.

3 replies

Inspiring
July 7, 2008
I have just completed a test of this so that it doesn't post to the database; the email came through fine!

It seems that the data is being swallowed up during the process of entering into the database and it is no longer available for the email to pick up on.

So, what am I doing wrong here?

Mat
Inspiring
July 7, 2008
Line 87 is:

if not objCustMail.Send.....

Anyway, I have commented out the objCustMail info just to see if I can get the email fired off, and yes, I can.

So, it works for the first email to the sale team for example, but not to the user who completed the form. Odd!

HOWEVER... none of the info that is being entered by the user is being captured in the email that is getting sent!

& Request.Form("?????") seems to have stopped collecting the data. The data is entering into the database fine, but none of it is appearing in the confirmation email.

Any ideas as to why?

Thanks.

Mat
Inspiring
July 6, 2008
What is Line 87?