troubleshooting Question

Processing a Form with JMail

Avatar of coreybryant
coreybryantFlag for United States of America asked on
ASPWeb Components
13 Comments3 Solutions1190 ViewsLast Modified:
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

%>

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.  
ASKER CERTIFIED SOLUTION
coreybryant

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros