Having a problem with a jmail email script and cannot seem to solve this
error any sugestions welcome.
Error shows in browser as
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'JMail'
/SendEMail2.asp, line 38
================================================== ======
sendemail2 script
================================================== ======
<%
Option Explicit
Response.Expires = -10000
%>
<%
Dim mComponentLoop
Dim mComponentCount
mComponentCount = Request.Form("ComponentCount")
If Request.Form("name") <> "" Then
Dim EMail, Name, Tel, Recipient, Subject
EMail = Request.Form("EMail")
Name = Request.Form("Name")
Tel = Request.Form("Tel")
Recipient = Request.Form("Recipient")
Subject = "Potential customer interest"
'start email section
'**************** COMMENT THIS OUT TO SEND JMAIL ******
'Response.Write "This is just the confirmation page.<br /><br />"
'Response.Write "Name:" & Name & "<br />"
'Response.Write "EMail:" & EMail & "<br />"
'Response.Write "Tel:" & Tel & "<br />"
'Response.Write "Recipient:" & Recipient & "<br />"
'Response.Write "Subject:" & Subject & "<br />"
'Response.Write "BodyText:" & Request.Form("bodytext")
'Response.End
'************************************************* ****
Set JMail = Server.CreateObject ("JMail.SMTPMail")
JMail.ServerAddress = "actual address removed"
JMail.Sender = Name
JMail.ReplyTo = Email
JMail.Subject = Subject
JMail.AddRecipient Recipient
JMail.Body = Name & Email & Tel & vbCrLf & BodyText
JMail.Priority = 3
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
JMail.Execute
Set jMail = Nothing
Response.Redirect("formthanks.html")
'Else
'do nothing, just display blank form
'End IF
ODBCConnection.Close
Set ODBCConnection=Nothing
Else
Dim mEMailBody
mEMailBody = mEMailBody & "<table border='0' cellspacing='1'
cellpadding='1' width='400'>"
mEMailBody = mEMailBody & "<tr><td><b>Component</b></td><td align='right'>
<b>£</b></td></tr>"
For mComponentLoop = 1 to mComponentCount
mEMailBody = mEMailBody & "<tr>"
mEMailBody = mEMailBody & "<td>" & Request.Form("Component" &
mComponentLoop) & "</td>"
mEMailBody = mEMailBody & "<td align='right'>" & Request.Form
("ComponentPrice" & mComponentLoop) & "</td>"
mEMailBody = mEMailBody & "</tr>"
Next
mEMailBody = mEMailBody & "<tr><td align='right'><b>Total:</b></td><td>£" &
Request.Form("ComponentPriceTotal") & "</td></tr>"
mEMailBody = mEMailBody & "</table>"
Response.Write mEMailBody
Response.Write "<form method='post' action='SendEMail2.asp'>"
Response.Write "Name:<input type='text' name='Name' value='' /><br />"
Response.Write "EMail Address:<input type='text' name='EMail' value='' /
<br/>"
Response.Write "Tel No:<input type='text' name='Tel' value='' /><br />"
Response.Write "<input type=""hidden"" name=""Recipient""
value=""em***@actualremoved.com"" /><br />"
Response.Write "<input type=""hidden"" name=""BodyText"" value=""" &
mEMailBody & """ />"
Response.Write "<input type=""submit"" value="" Send EMail "" /><br />"
Response.Write "</form>"
End If
%> 4 4363
Looks like you've forgotten to Dim JMAIL which is probably the cause of the
error.
--
Regards
Steven Burn
Ur I.T. Mate Group www.it-mate.co.uk
Keeping it FREE!
Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Kingdom <ki*****@removehotmail.com> wrote in message
news:Xn**********************************@194.117. 133.134... Having a problem with a jmail email script and cannot seem to solve this error any sugestions welcome.
Error shows in browser as
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'JMail'
/SendEMail2.asp, line 38
================================================== ====== sendemail2 script ================================================== ====== <% Option Explicit Response.Expires = -10000 %> <%
Dim mComponentLoop Dim mComponentCount
mComponentCount = Request.Form("ComponentCount")
If Request.Form("name") <> "" Then
Dim EMail, Name, Tel, Recipient, Subject
EMail = Request.Form("EMail") Name = Request.Form("Name") Tel = Request.Form("Tel") Recipient = Request.Form("Recipient") Subject = "Potential customer interest"
'start email section
'**************** COMMENT THIS OUT TO SEND JMAIL ****** 'Response.Write "This is just the confirmation page.<br /><br />" 'Response.Write "Name:" & Name & "<br />" 'Response.Write "EMail:" & EMail & "<br />" 'Response.Write "Tel:" & Tel & "<br />" 'Response.Write "Recipient:" & Recipient & "<br />" 'Response.Write "Subject:" & Subject & "<br />" 'Response.Write "BodyText:" & Request.Form("bodytext") 'Response.End '************************************************* ****
Set JMail = Server.CreateObject ("JMail.SMTPMail") JMail.ServerAddress = "actual address removed" JMail.Sender = Name JMail.ReplyTo = Email JMail.Subject = Subject JMail.AddRecipient Recipient JMail.Body = Name & Email & Tel & vbCrLf & BodyText JMail.Priority = 3 JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR") JMail.Execute Set jMail = Nothing
Response.Redirect("formthanks.html") 'Else 'do nothing, just display blank form
'End IF ODBCConnection.Close Set ODBCConnection=Nothing
Else
Dim mEMailBody mEMailBody = mEMailBody & "<table border='0' cellspacing='1' cellpadding='1' width='400'>" mEMailBody = mEMailBody & "<tr><td><b>Component</b></td><td align='right'> <b>£</b></td></tr>"
For mComponentLoop = 1 to mComponentCount mEMailBody = mEMailBody & "<tr>" mEMailBody = mEMailBody & "<td>" & Request.Form("Component" & mComponentLoop) & "</td>" mEMailBody = mEMailBody & "<td align='right'>" & Request.Form ("ComponentPrice" & mComponentLoop) & "</td>" mEMailBody = mEMailBody & "</tr>" Next
mEMailBody = mEMailBody & "<tr><td align='right'><b>Total:</b></td><td>£"
& Request.Form("ComponentPriceTotal") & "</td></tr>" mEMailBody = mEMailBody & "</table>"
Response.Write mEMailBody
Response.Write "<form method='post' action='SendEMail2.asp'>" Response.Write "Name:<input type='text' name='Name' value='' /><br />" Response.Write "EMail Address:<input type='text' name='EMail' value='' / <br/>" Response.Write "Tel No:<input type='text' name='Tel' value='' /><br />" Response.Write "<input type=""hidden"" name=""Recipient"" value=""em***@actualremoved.com"" /><br />" Response.Write "<input type=""hidden"" name=""BodyText"" value=""" & mEMailBody & """ />" Response.Write "<input type=""submit"" value="" Send EMail "" /><br />" Response.Write "</form>"
End If %>
"Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in
news:uF**************@tk2msftngp13.phx.gbl: Looks like you've forgotten to Dim JMAIL which is probably the cause of the error.
--
Regards
Steven Burn Ur I.T. Mate Group www.it-mate.co.uk
Keeping it FREE!
Disclaimer: I know I'm probably wrong, I just like taking part ;o)
Kingdom <ki*****@removehotmail.com> wrote in message news:Xn**********************************@194.117. 133.134... Having a problem with a jmail email script and cannot seem to solve this error any sugestions welcome.
Error shows in browser as
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'JMail'
/SendEMail2.asp, line 38
================================================== ====== sendemail2 script ================================================== ====== <% Option Explicit Response.Expires = -10000 %> <%
Dim mComponentLoop Dim mComponentCount
mComponentCount = Request.Form("ComponentCount")
If Request.Form("name") <> "" Then
Dim EMail, Name, Tel, Recipient, Subject
EMail = Request.Form("EMail") Name = Request.Form("Name") Tel = Request.Form("Tel") Recipient = Request.Form("Recipient") Subject = "Potential customer interest"
'start email section
'**************** COMMENT THIS OUT TO SEND JMAIL ****** 'Response.Write "This is just the confirmation page.<br /><br />" 'Response.Write "Name:" & Name & "<br />" 'Response.Write "EMail:" & EMail & "<br />" 'Response.Write "Tel:" & Tel & "<br />" 'Response.Write "Recipient:" & Recipient & "<br />" 'Response.Write "Subject:" & Subject & "<br />" 'Response.Write "BodyText:" & Request.Form("bodytext") 'Response.End '************************************************* ****
Set JMail = Server.CreateObject ("JMail.SMTPMail") JMail.ServerAddress = "actual address removed" JMail.Sender = Name JMail.ReplyTo = Email JMail.Subject = Subject JMail.AddRecipient Recipient JMail.Body = Name & Email & Tel & vbCrLf & BodyText JMail.Priority = 3 JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR") JMail.Execute Set jMail = Nothing
Response.Redirect("formthanks.html") 'Else 'do nothing, just display blank form
'End IF ODBCConnection.Close Set ODBCConnection=Nothing
Else
Dim mEMailBody mEMailBody = mEMailBody & "<table border='0' cellspacing='1' cellpadding='1' width='400'>" mEMailBody = mEMailBody & "<tr><td><b>Component</b></td><td align='right'> <b>£</b></td></tr>"
For mComponentLoop = 1 to mComponentCount mEMailBody = mEMailBody & "<tr>" mEMailBody = mEMailBody & "<td>" & Request.Form("Component" & mComponentLoop) & "</td>" mEMailBody = mEMailBody & "<td align='right'>" & Request.Form ("ComponentPrice" & mComponentLoop) & "</td>" mEMailBody = mEMailBody & "</tr>" Next
mEMailBody = mEMailBody & "<tr><td align='right'><b>Total:</b></td><td>£" & Request.Form("ComponentPriceTotal") & "</td></tr>" mEMailBody = mEMailBody & "</table>"
Response.Write mEMailBody
Response.Write "<form method='post' action='SendEMail2.asp'>" Response.Write "Name:<input type='text' name='Name' value='' /><br />" Response.Write "EMail Address:<input type='text' name='EMail' value='' / <br/>" Response.Write "Tel No:<input type='text' name='Tel' value='' /><br />" Response.Write "<input type=""hidden"" name=""Recipient"" value=""em***@actualremoved.com"" /><br />" Response.Write "<input type=""hidden"" name=""BodyText"" value=""" & mEMailBody & """ />" Response.Write "<input type=""submit"" value="" Send EMail "" /><br />" Response.Write "</form>"
End If %>
yup, thanks
> yup, thanks
Wow, I scrolled all the way down for that?
The delete key is your friend, really. :-)
Aaron,
I love reading your posts. I get a chuckle from you almost
everytime I check in here.
Keep up the good work!
John -----Original Message----- yup, thanks
Wow, I scrolled all the way down for that?
The delete key is your friend, really. :-)
. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Lasse Edsvik |
last post by:
Hello
I use this code to send massmail with an attachment using JMail 4
proffessional. and the attachment seems to be attached but when i open it
the first time my system32 folder opens..........
|
by: Kingdom |
last post by:
I have a SelectBoxes.asp page that is working with multiple selection
dropdown boxes to extract data and total the selection prices.
Tom & Bob were kind enough to give me a big help getting this...
|
by: BDKiii |
last post by:
Ok.. I know this has been covered before -but- here it is again...
I installed Jmail to my server and tested it... and it worked fine.
I then installed W#.Upload to the same server and tested it to...
|
by: rourou |
last post by:
Hello everyone
In VB.NET i can use Jmail to send a mai
code
Dim JMai
JMail = Server.CreateObject("JMail.Message"
JMail.silent = Tru
JMail.Logging = Tru
JMail.Charset = "gb2312
|
by: Mangler |
last post by:
I am new to Jmail/ASP and either need some help or someone to tell me I
am stupid...
I got Jmail to work fine. My problem is I need to send an email based
on somthing a customer submitted. ...
|
by: johnet |
last post by:
Error: jmail.SMTPMail error '8000ffff'
Cannot open file L:/ems/mail/hi.html
Code:
<%
DIM strEmail, strFirstName, strLastName, strSubject, strComments, Mailer
|
by: vernon1231 |
last post by:
Hi! PLEASE need help!
My aim is to make a newsletter, therefor I need a picture to go a long with the mail I am creating from a mailinglist. When I am opening my mail I dont get my picture but a...
|
by: cgrudzinski |
last post by:
Hello,
I have JMail working without attachments but now want to start using this feature. When using the .addattachment though the email received contains the binary data of the attachment - see...
|
by: borisding |
last post by:
Hi there,
I'm using Jmail for sending email with some attachments. Basically, I will need to send out email with the contents in unicode characters such as Simplified Chinese, Japanese etc.
I...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |