Solved

jmail HTTP 500 error

Posted on 2007-11-25
3
514 Views
Last Modified: 2008-02-01
I am getting a HTTP 500 error using jmail. I had jmail working at one time, don't know what has changed. It did work once upon a time. This is a co-located server. Here is my code:

<%

'NOTE: YOU MUST UPDATE THE FOLLOWING 3 VARIABLES
Dim strMailDomain, strMailUserName, strMailPassword

strMailDomain = "xxx.xx.com"
strMailUserName = "abc@abc.com"
strMailPassword = "mailpassword"


' Get the form data from HTML form with 6 fields
Dim name, senderEmail,telephone,subject,recipient,body

name = Request.Form("name")
senderEmail = Request.Form("email")
telephone = Request.form("telephone")
subject = "Regarding " & Request.Form("subject")
recipient = Request.Form("recipient")
body = Request.Form("body")

'Response.write name

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


' Enter the sender data
msg.From = xxx@xxx.com
msg.FromName = xxx

'Server Authentication
msg.MailServerUserName = strMailUserName
msg.MailServerPassWord = strMailPassword



' Note that as addRecipient is method and not
' a property, we do not use an equals ( = ) sign
msg.AddRecipient "xxx@xxx.com"
msg.AddRecipientCC "xxx@xxx.com"
msg.AddRecipientBCC ""

' The subject of the message
msg.Subject = subject

' And the body
msg.body = body

Response.write msg.log

' Now send the message, using the indicated mailserver
if not msg.Send(strMailDomain) then
Response.write "<pre>" & msg.log & "</pre>"
else
Response.write "Thank you for taking the time to contact us. <br /><br />We will reply as soon as possible, often the same day."
end if

'Response.write msg.log
'Response.write "a"
' That's it - you can add additional e-mail addresses as required.

%>
0
Comment
Question by:jamesh1031
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
B_Dorsey earned 500 total points
ID: 20348468
turn off friendly errors in IE and find out what the real error is.
0
 

Author Comment

by:jamesh1031
ID: 20349542
Microsoft VBScript compilation error '800a0400'

Expected statement

/jmail.asp, line 5

Option Explicit
^
0
 

Author Comment

by:jamesh1031
ID: 20349622
By seeing the line of the error, I was able to make progress. Thank you.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now