Link to home
Start Free TrialLog in
Avatar of coreybryant
coreybryantFlag for United States of America

asked on

Processing a Form with JMail

I do not need SMTP authentication on one of the servers and I am having a difficult time remember what to use.
<%
Dim nameName,name,emailName,email
Dim subject,subjectName,messageName,message
Dim IPname,IP,User_Agentname,User_Agent,accesscodeName,accesscode
Dim refererName,referer
nameName = "Name: "
name = Request.Form("name")
emailName = "E-Mail Address: "
email = Request.Form("email")
subjectName = "Subject: "
subject = Request.Form("subject")
messageName = "Message: "
message = Request.Form("message")
accesscodeName = "Access Code: "
accesscode = Request.Form("accesscode")
IPname = "IP Address: "
IP = Request.Form("IP")
User_Agentname = "Browser Info: "
User_Agent = Request.Form("User_Agent")
refererName = "URL: "
referer = Request.Form("referer")

Set JMail = Server.CreateObject("JMail.Message")
'Change this line to the address of your
'email server. Something like this: mail.yoursite.com:25
JMail.ServerAddress = "mail.example-host.com:25"


JMail.AddRecipient "support@example.com"
'in the next line you can change that email address to something else 
'like "myform@myurl.com", just be sure and put it between quotes " "
JMail.From = Request.Form("email")

'in the next line you can change that email address to something else 
'like "myform@myurl.com", just be sure and put it between quotes " "
JMail.Sender = Request.Form("email")
'you can also change "Form Submission" to something else like "form results" etc.
JMail.Subject = "From Merchant Account Resources regarding: " & Request.Form("subject")
'JMail.Subject = "milehighmerchantaccounts" Request.Form("subject")
JMail.Body = nameName & name & vbcrlf&_
emailName & email & vbcrlf&_
messageName & message & vbcrlf&_
vbcrlf&_
IPname & IP & vbcrlf&_
User_Agentname & User_Agent & vbcrlf&_
referername & referer & vbcrlf&_
accesscodeName & accesscode
'HERE you make a choice. You can redirect the user to any page in your site
'Response.Redirect "confirm.asp"
'Or just say thanks. Delete the line you dont want. Either above or below
JMail.Execute

%>

Open in new window


I don't know if I should use JMail.Send or not.  I get an Internal 500 error but I a have friendly messages turned off to help but that is not working.  
Avatar of jawa29
jawa29
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi

If you're not getting a full error returned it might be that the IIS server isn't configured to send them. this is how it is done in IIS 7 http://learn.iis.net/page.aspx/564/classic-asp-script-error-messages-no-longer-shown-in-web-browser-by-default/

Now onto your sending issue, you could try this:
comment out line 26 and then at the bottom replace JMail.Execute with JMail.Send("mail.example-host.com:25")

Jawa29
Avatar of coreybryant

ASKER

I am still getting that error, here is the complete code just in case:
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>

<head>
<title>Processing Matters - When Processing Matters Most</title>
<meta content="application/xhtml+xml; charset=utf-8" http-equiv="Content-Type" />
<meta content="" name="description" />
<meta content="" name="keywords" />
<meta content="index, follow" name="robots" />
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="includes/style.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
<!--
function isEMail( strValue) {
  var objRegExp  = /^[a-z]\w*([.\-]\w+)*@[a-z]\w*([.\-]\w+)*\.[a-z]{2,3}$/i;
  return objRegExp.test(strValue);
}
function validate(theForm){
    if(theForm.EMail.value == ""){
         alert('Please enter a valid E-mail address to submit the form');
         theForm.EMail.focus();
         return false;
    }
    if(!isEMail(theForm.EMail.value)){
         alert('Please enter a valid E-mail address to submit the form');
         theForm.EMail.select();
         theForm.EMail.focus();
         return false;
         }
    return true;
}

function isNumberKey(evt) {
    var charCode = (evt.which) ? evt.which : event.keyCode
    if (charCode > 31 && (charCode < 48 || charCode > 57))
        return false;

    return true;
}

// -->
</script>
<style type="text/css">
label,input {
	display: block;
	float: left;
	margin-bottom: 10px;
}
input, select, textarea
{
	border: solid 1px #000;
	background-color: #fff;
	font-family: Verdana, Helvetica, Arial, sans-serif;
	font-size: 1.0em;
}
label {
	text-align: right;
	width: 125px;
	padding-right: 20px;
}

br {
	clear: left;
}
</style>

</head>

<body>
<% 
dim strError

strError=""
 function randomNumber()
 dim captchaLable 
 captchaLable="Please complete 5+4 ="

 Dim rand1 , rand2
Randomize

do
rand1 = (int)(Rnd * 9)+1
rand2 = (int)(Rnd * 9)+1
loop while(rand1 + rand2 >9)

session("captcha")= rand1 + rand2
randomNumber = "Please complete " & rand1 & "+" & rand2 & "="

 end function

  if request("action") = "testcaptch" then 

dim enteredValue

enteredValue= Request.Form("captcha")
        strError="not match"

        if enteredValue<>"" then
            if (int)(enteredValue)=session("captcha") then
                strError=""
                Dim nameName,name,companyName,company,emailName,email
Dim phoneName,phone,countryName,country,subject,subjectName,messageName,message
Dim IPname,IP,User_Agentname,User_Agent,accesscodeName,accesscode
Dim webURLname,webURL,businessname,business
Dim refererName,referer, URL, URLname

Dim modelName, model
model = Request.Form("model")
if model <> "" then Response.Redirect "no-confirm.asp"

nameName = "Name: "
name = Request.Form("name")
companyName = "Company: "
company = Request.Form("company")
emailName = "E-Mail Address: "
email = Request.Form("email")
Countryname = "Country: "
Country = Request.Form("Country")
phoneName = "Phone Number: "
phone = Request.Form("phone")
webURLName = "Website URL: "
webURL = Request.Form("webURL")
businessName = "Type of Business: "
business = Request.Form("business")
subjectName = "Subject: "
subject = Request.Form("subject")
messageName = "Message: "
message = Request.Form("message")
accesscodeName = "Access Code: "
accesscode = Request.Form("accesscode")

IPname = "IP Address: "
IP = Request.Form("IP")
User_Agentname = "Browser Info: "
User_Agent = Request.Form("User_Agent")
refererName = "URL: "
referer = Request.Form("referer")
Set JMail = Server.CreateObject("JMail.Message")
JMail.AddRecipient "support@example.com"
JMail.From = Request.Form("email")
JMail.Subject = "From Processing Matters regarding: " & Request.Form("subject")
JMail.Body = nameName & name & vbcrlf&_
companyName & company & vbcrlf&_
emailName & email & vbcrlf&_
countryName & country & vbcrlf&_
phoneName & phone & vbcrlf&_
webURLName & webURL & vbcrlf&_
businessName & business & vbcrlf&_
messageName & message & vbcrlf&_
vbcrlf&_
IPname & IP & vbcrlf&_
User_Agentname & User_Agent & vbcrlf&_
referername & referer & vbcrlf&_
accesscodeName & accesscode & vbcrlf&_
URLName & URL
'JMail.Execute
JMail.Send("mail.dotnet-host.com ")
response.Redirect("confirm.asp?name=" & name)
'HERE you make a choice. You can redirect the user to any page in your site
'Response.Redirect "confirm.asp"
'Or just say thanks. Delete the line you dont want. Either above or below
            end if
        end if
        
end if
 %>
<div id="header">
	<!-- Start of Header -->
	<!--#include file="includes/header.asp" -->
	<!-- End of Header --></div>
<div class="colmask rightmenu">
	<div class="colleft">
		<div class="col1">
			<!-- Start of Main Content -->
			<!--#include file="includes/headernav.asp" -->
									<h2>Contact Processing Matters</h2>
		<p>Please try to provide at least an URL and an e-mail address.&nbsp;  That way, if we do not hear from you
we will try to call you.&nbsp; Sometimes, emails might go into your spam folder and you might miss it.&nbsp; 
The more information you can provide, the better.&nbsp; Thank you!</p>

<% if strError<>"" then %>
<p style='color:red'>Sorry, the number for the random equasion that entered is 
incorrect.&nbsp; Please re-enter.</p>
<% end if %>
		<form method="post" action="contact.asp?action=testcaptch" onsubmit="return validate(this)">
			<input type="hidden" name="IP" value="<%Response.Write(Request.ServerVariables("remote_addr"))%>" />
			<input type="hidden" name="URL" value="<%Response.Write(Request.ServerVariables("url"))%>" />
			<input type="hidden" name="path_translated" value="<%Response.Write(Request.ServerVariables("path_translated"))%>" />
			<input type="hidden" name="User_Agent" value="<%Response.Write(Request.ServerVariables("http_user_agent"))%>" />
			<input type="hidden" name="title" value="<%= title %>" />
<input type="hidden" name="referer" value="<%= referer %>" />
<input type="hidden" name="model" />
			<br />
			<%
								  err=request.querystring("err")
									  if err=1 then 	
									  		name=session("name")
											email=session("email")
											message=session("message")					
									  %><%=session("errmsg")%> <%	 
									  end if
									%> <label for="name">Name</label><input id="name" name="name" value='<%=  request.form("name") %>'    <%= response.write(name) %>  /><br />
			<label for="company">Company</label><input id="company" name="company" value='<%=  request.form("company") %>' <%= response.write(company) %>  /><br />
			<label for="email">E-Mail</label><input id="email" name="email" value='<%=  request.form("email") %>' <%= response.write(phone) %> /><br />
			<label for="phone">Phone Number</label><input id="phone" name="phone" value='<%=  request.form("phone") %>' <%= response.write(phone) %>  /><br />
			<label for="webURL">Website URL</label><input id="webURL" name="webURL" value='<%=  request.form("webURL") %>' <%= response.write(phone) %>  /><br class="formfield" />
			<label for="business">Business Type</label><input id="business" name="business" value='<%=  request.form("business") %>' <%= response.write(phone) %>  /><br class="formfield" />
			<label for="country">Country</label><input id="country" name="country" value='<%=  request.form("country") %>' <%= response.write(country) %>  /><br />
			<label for="subject">Subject</label><input id="subject" name="subject" value='<%=  request.form("subject") %>' <%= response.write(subject) %>  /><br />
			<label for="Message">Message</label><textarea rows="5" name="message"  id="message" cols="30" <%= response.write(message) %> > <%=  request.form("message") %></textarea><br />
            <label for="captcha"> <% response.write randomNumber %>  </label><input onkeypress="return isNumberKey(event)" id="captcha" name="captcha"  /><br />
			<p style="padding-left: 125px; padding-top:10px">
			<input type="submit" value="Submit" name="submit" /></p>
		</form>

<p style="padding-top:25px; text-align:center">or <a style="font-weight:bold" href="http://www.google.com/recaptcha/mailhide/d?k=01MgPM55eRTk6fLBbqFRxtHA==&amp;c=gs6Z7Z5qH2xNkVYCnAu4Jpst9-MyC2cqXXAIhHfH4vo=" onclick="window.open('http://www.google.com/recaptcha/mailhide/d?k\07501MgPM55eRTk6fLBbqFRxtHA\75\75\46c\75gs6Z7Z5qH2xNkVYCnAu4Jpst9-MyC2cqXXAIhHfH4vo\075', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;" title="Reveal this e-mail address">E-Mail Us</a> or call us 888-928-5280 or 303-990-5115</p>
		<p style="clear:both; padding-top:10px;">Our mailing address is: <br />
Merchant Account Lab<br />
558 Castle Pines Parkway, Unit B-4 Ste 150<br />
Castle Rock, CO 80108</p>
			<!-- End of Main Content -->
			<!-- Column 1 end --></div>
		<div class="col2">
			<!-- Start of Navigation -->
			<!--#include file="includes/navigation.asp" -->
			<!-- End of Navigation --></div>
	</div>
</div>
<div id="footer">
	<!-- Start of Footer -->
	<!--#include file="includes/footer.asp" -->
	<!-- End of Footer --></div>

</body>

</html>

Open in new window

confirm.asp
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>

<head>
<title>Processing Matters - When Processing Matters Most</title>
<meta content="application/xhtml+xml; charset=utf-8" http-equiv="Content-Type" />
<meta content="" name="description" />
<meta content="" name="keywords" />
<meta content="index, follow" name="robots" />
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="includes/style.css" rel="stylesheet" type="text/css" />
</head>

<body>

<div id="header">
	<!-- Start of Header -->
	<!--#include file="includes/header.asp" -->
	<!-- End of Header --></div>
<div class="colmask rightmenu">
	<div class="colleft">
		<div class="col1">
			<!-- Start of Main Content -->
			<!--#include file="includes/headernav.asp" -->
			<h2>Thank you!</h2>
<p>Thank you, <%Response.Write(request.QueryString("name")) %>, for contacting 
Processing Matters.&nbsp; 
A representative will contact you as soon as possible.</p>
<p>You can also check out
<a href="http://www.milehighmerchantaccounts.com/" title="Get a Merchant Account with Mile High Merchant Accounts">
Mile High Merchant Accounts</a>,
<a href="http://www.mymerchantaccountblog.com/" title="My Merchant Account Blog">
My Merchant Account Blog</a> or
<a href="http://www.merchantaccountresources.com/" title="Merchant Account Resources Directory">
Merchant Account Resources Directory</a> for more information.</p>
			<!-- End of Main Content -->
			<!-- Column 1 end --></div>
		<div class="col2">
			<!-- Start of Navigation -->
			<!--#include file="includes/navigation.asp" -->
			<!-- End of Navigation --></div>
	</div>
</div>
<div id="footer">
	<!-- Start of Footer -->
	<!--#include file="includes/footer.asp" -->
	<!-- End of Footer --></div>

</body>

</html>

Open in new window

Your mission should be to get the error messages displaying properly.

What version of IIS are you running?

Jawa29
SOLUTION
Avatar of worthyking1
worthyking1
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am now able to receive the error message:


Microsoft VBScript runtime
error '800a01ad'
ActiveX component can't create object

/contact.asp, line 139

Line 129 is:
Set JMail = Server.CreateObject("JMail.SMTPMail")

Open in new window


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>

<head>
<title>Processing Matters - When Processing Matters Most</title>
<meta content="application/xhtml+xml; charset=utf-8" http-equiv="Content-Type" />
<meta content="" name="description" />
<meta content="" name="keywords" />
<meta content="index, follow" name="robots" />
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="includes/style.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
<!--
function isEMail( strValue) {
  var objRegExp  = /^[a-z]\w*([.\-]\w+)*@[a-z]\w*([.\-]\w+)*\.[a-z]{2,3}$/i;
  return objRegExp.test(strValue);
}
function validate(theForm){
    if(theForm.EMail.value == ""){
         alert('Please enter a valid E-mail address to submit the form');
         theForm.EMail.focus();
         return false;
    }
    if(!isEMail(theForm.EMail.value)){
         alert('Please enter a valid E-mail address to submit the form');
         theForm.EMail.select();
         theForm.EMail.focus();
         return false;
         }
    return true;
}

function isNumberKey(evt) {
    var charCode = (evt.which) ? evt.which : event.keyCode
    if (charCode > 31 && (charCode < 48 || charCode > 57))
        return false;

    return true;
}

// -->
</script>
<style type="text/css">
label,input {
	display: block;
	float: left;
	margin-bottom: 10px;
}
input, select, textarea
{
	border: solid 1px #000;
	background-color: #fff;
	font-family: Verdana, Helvetica, Arial, sans-serif;
	font-size: 1.0em;
}
label {
	text-align: right;
	width: 125px;
	padding-right: 20px;
}

br {
	clear: left;
}
</style>

</head>

<body>
<% 
dim strError

strError=""
 function randomNumber()
 dim captchaLable 
 captchaLable="Please complete 5+4 ="

 Dim rand1 , rand2
Randomize

do
rand1 = (int)(Rnd * 9)+1
rand2 = (int)(Rnd * 9)+1
loop while(rand1 + rand2 >9)

session("captcha")= rand1 + rand2
randomNumber = "Please complete " & rand1 & "+" & rand2 & "="

 end function

  if request("action") = "testcaptch" then 

dim enteredValue

enteredValue= Request.Form("captcha")
        strError="not match"

        if enteredValue<>"" then
            if (int)(enteredValue)=session("captcha") then
                strError=""
                Dim nameName,name,companyName,company,emailName,email
Dim phoneName,phone,countryName,country,subject,subjectName,messageName,message
Dim IPname,IP,User_Agentname,User_Agent,accesscodeName,accesscode
Dim webURLname,webURL,businessname,business
Dim refererName,referer, URL, URLname

Dim modelName, model
model = Request.Form("model")
if model <> "" then Response.Redirect "no-confirm.asp"

nameName = "Name: "
name = Request.Form("name")
companyName = "Company: "
company = Request.Form("company")
emailName = "E-Mail Address: "
email = Request.Form("email")
Countryname = "Country: "
Country = Request.Form("Country")
phoneName = "Phone Number: "
phone = Request.Form("phone")
webURLName = "Website URL: "
webURL = Request.Form("webURL")
businessName = "Type of Business: "
business = Request.Form("business")
subjectName = "Subject: "
subject = Request.Form("subject")
messageName = "Message: "
message = Request.Form("message")
accesscodeName = "Access Code: "
accesscode = Request.Form("accesscode")

IPname = "IP Address: "
IP = Request.Form("IP")
User_Agentname = "Browser Info: "
User_Agent = Request.Form("User_Agent")
refererName = "URL: "
referer = Request.Form("referer")
Set JMail = Server.CreateObject("JMail.Message")
'Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = "mail.dotnet-host.com:25"
JMail.AddRecipient "support@example.com"
'JMail.Sender = "form@example.com"
JMail.From = Request.Form("email")
'you can also change "Form Submission" to something else like "form results" etc.
JMail.Subject = "From Processing Matter regarding: " & Request.Form("subject")
'JMail.Subject = "milehighmerchantaccounts" Request.Form("subject")
JMail.Body = nameName & name & vbcrlf&_
companyName & company & vbcrlf&_
emailName & email & vbcrlf&_
countryName & country & vbcrlf&_
phoneName & phone & vbcrlf&_
webURLName & webURL & vbcrlf&_
businessName & business & vbcrlf&_
messageName & message & vbcrlf&_
vbcrlf&_
IPname & IP & vbcrlf&_
User_Agentname & User_Agent & vbcrlf&_
referername & referer & vbcrlf&_
accesscodeName & accesscode & vbcrlf&_
URLName & URL
'JMail.Send("mail.dotnet-host.com ")
JMail.Execute
Set JMail = Nothing
response.Redirect("confirm.asp?name=" & name)
'HERE you make a choice. You can redirect the user to any page in your site
'Response.Redirect "confirm.asp"
'Or just say thanks. Delete the line you dont want. Either above or below
            end if
        end if
        
end if
 %>
<div id="header">
	<!-- Start of Header -->
	<!--#include file="includes/header.asp" -->
	<!-- End of Header --></div>
<div class="colmask rightmenu">
	<div class="colleft">
		<div class="col1">
			<!-- Start of Main Content -->
			<!--#include file="includes/headernav.asp" -->
									<h2>Contact Merchant Account Lab</h2>
		<p>Please try to provide at least an URL and an e-mail address.&nbsp;  That way, if we do not hear from you
we will try to call you.&nbsp; Sometimes, emails might go into your spam folder and you might miss it.&nbsp; 
The more information you can provide, the better.&nbsp; Thank you!</p>

<% if strError<>"" then %>
<p style='color:red'>Sorry, the number for the random equasion that entered is 
incorrect.&nbsp; Please re-enter.</p>
<% end if %>
		<form method="post" action="contact.asp?action=testcaptch" onsubmit="return validate(this)">
			<input type="hidden" name="IP" value="<%Response.Write(Request.ServerVariables("remote_addr"))%>" />
			<input type="hidden" name="URL" value="<%Response.Write(Request.ServerVariables("url"))%>" />
			<input type="hidden" name="path_translated" value="<%Response.Write(Request.ServerVariables("path_translated"))%>" />
			<input type="hidden" name="User_Agent" value="<%Response.Write(Request.ServerVariables("http_user_agent"))%>" />
			<input type="hidden" name="title" value="<%= title %>" />
<input type="hidden" name="referer" value="<%= referer %>" />
<input type="hidden" name="model" />
			<br />
			<%
								  err=request.querystring("err")
									  if err=1 then 	
									  		name=session("name")
											email=session("email")
											message=session("message")					
									  %><%=session("errmsg")%> <%	 
									  end if
									%> <label for="name">Name</label><input id="name" name="name" value='<%=  request.form("name") %>'    <%= response.write(name) %>  /><br />
			<label for="company">Company</label><input id="company" name="company" value='<%=  request.form("company") %>' <%= response.write(company) %>  /><br />
			<label for="email">E-Mail</label><input id="email" name="email" value='<%=  request.form("email") %>' <%= response.write(phone) %> /><br />
			<label for="phone">Phone Number</label><input id="phone" name="phone" value='<%=  request.form("phone") %>' <%= response.write(phone) %>  /><br />
			<label for="webURL">Website URL</label><input id="webURL" name="webURL" value='<%=  request.form("webURL") %>' <%= response.write(phone) %>  /><br class="formfield" />
			<label for="business">Business Type</label><input id="business" name="business" value='<%=  request.form("business") %>' <%= response.write(phone) %>  /><br class="formfield" />
			<label for="country">Country</label><input id="country" name="country" value='<%=  request.form("country") %>' <%= response.write(country) %>  /><br />
			<label for="subject">Subject</label><input id="subject" name="subject" value='<%=  request.form("subject") %>' <%= response.write(subject) %>  /><br />
			<label for="Message">Message</label><textarea rows="5" name="message"  id="message" cols="30" <%= response.write(message) %> > <%=  request.form("message") %></textarea><br />
            <label for="captcha"> <% response.write randomNumber %>  </label><input onkeypress="return isNumberKey(event)" id="captcha" name="captcha"  /><br />
			<p style="padding-left: 125px; padding-top:10px">
			<input type="submit" value="Submit" name="submit" /></p>
		</form>

<p style="padding-top:25px; text-align:center">or <a style="font-weight:bold" href="http://www.google.com/recaptcha/mailhide/d?k=01MgPM55eRTk6fLBbqFRxtHA==&amp;c=gs6Z7Z5qH2xNkVYCnAu4Jpst9-MyC2cqXXAIhHfH4vo=" onclick="window.open('http://www.google.com/recaptcha/mailhide/d?k\07501MgPM55eRTk6fLBbqFRxtHA\75\75\46c\75gs6Z7Z5qH2xNkVYCnAu4Jpst9-MyC2cqXXAIhHfH4vo\075', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;" title="Reveal this e-mail address">E-Mail Us</a> or call us 888-928-5280 or 303-990-5115</p>
		<p style="clear:both; padding-top:10px;">Our mailing address is: <br />
Merchant Account Lab<br />
558 Castle Pines Parkway, Unit B-4 Ste 150<br />
Castle Rock, CO 80108</p>
			<!-- End of Main Content -->
			<!-- Column 1 end --></div>
		<div class="col2">
			<!-- Start of Navigation -->
			<!--#include file="includes/navigation.asp" -->
			<!-- End of Navigation --></div>
	</div>
</div>
<div id="footer">
	<!-- Start of Footer -->
	<!--#include file="includes/footer.asp" -->
	<!-- End of Footer --></div>

</body>

</html>

Open in new window

Are you sure you actually have JMail installed on the server?
Yes it is installed.  

I tried another one that does not have the verification method and I received this error:
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'JMail.ServerAddress'
/confirm.asp, line 24

JMail.ServerAddress = "mail.dotnet-host.com:25"

Open in new window

It's been such a long time since I messed with this, but I know it is something pretty simple.  
Getting closer, I now have
Object doesn't support this property or method: 'JMail.From'

/confirm.asp, line 27

JMail.From = Request.Form("email")

Open in new window

This time I entered an email address that had my domain name on there.  
Makes no sense my man. The error you're getting is saying that the object (JMail) does not support that property (JMail.From), which is a standard property of the JMail component. Doesn't add up. Like you said, something else is wrong...and probably something really simple once you track it down.

Here's my standard approach to these problems: go back to square one and get a working script, then copy & paste the working script into your page and just scrap the old one. It can be faster than digging through code and not seeing that one comma that's in the wrong place :)

What I'm saying is take the manufacturer's code example, pop that on a fresh page, test it. If it works then you know the problem is with your script. Then simply copy/paste and switch out your variables in your live page.

If it doesn't work then you know the issue is with your server config.

Here's the developers simple example script (which you probably already have, but just in case)...
<%@LANGUAGE = VBSCRIPT%> <html>
<body>
<%

' Create the JMail message Object
set msg = Server.CreateOBject( "JMail.Message" )

' Set logging to true to ease any potential debugging
' And set silent to true as we wish to handle our errors ourself
msg.Logging = true
msg.silent = true

' Most mailservers require a valid email address
' for the sender
msg.From = "test@mydomain.com"
msg.FromName = "My Realname"

' Next we have to add some recipients.
' The addRecipients method can be used multiple times.
' Also note how we skip the name the second time, it
' is as you see optional to provide a name.
msg.AddRecipient "recipient@hisDomain.com", "His Name"
msg.AddRecipient "recipientelle@herDomain.com"


' The subject of the message
msg.Subject = "How you doin?"

' The body property is both read and write.
' If you want to append text to the body you can
' use JMail.Body = JMail.Body & "Hello world! "
' or you can use JMail.AppendText "Hello World! "
' which in many cases is easier to use.
'
' Note the use of vbCrLf to add linebreaks to our email
msg.Body = "Hello Jim" & vbCrLf & vbCrLf & "How's it going? ..."

' There.. we have now succesfully created our message.
' Now we can either send the message or save it
' as a draft in a Database.
' To save the message you would typicly use the
' Message objects Text property
' to do something like this:
'
' SaveMessageDraft( msg.Text )
' Note that this function call is only an
' example. The function does not exist by
' default, you have to create it yourself.


' To send the message, you use the Send()
' method, which takes one parameter that
' should be your mailservers address
'
' To capture any errors which might occur,
' we wrap the call in an IF statement
if not msg.Send("mail.myDomain.net" ) then
    Response.write "<pre>" & msg.log & "</pre>"
else
    Response.write "Message sent succesfully!"
end if


' And we're done! the message has been sent.

%>
</body>
</html>

Open in new window

Another though I had is that because you're naming your object "JMail" it very well may be conflicting with the server object named JMail. As a rule I never name my objects with the actual server object name. For example, name your object myJMail or something like that.

So, change to:

set myJMail = Server.CreateOBject( "JMail.Message")

And, of course, change all other occurences, such as myJMail.From, myJMail.Subject etc. etc.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I could not accept my answer as one of them but hopefully people will see this and it helps them