Reply
jmail email scrip Question
Old 06-11-2009, 12:43 PM jmail email scrip Question
aigb_mcd's Avatar
Experienced Talker

Posts: 39
Trades: 0
When I try to process the below script I get the HTTP 500 Servre Error. Can you take a look at my code and tell me why my form is not processing? I'm new to this asp jmail thing.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@LANGUAGE = VBSCRIPT%> <html>
<body>
<%
'set Variables
Dim Subject
Dim SenderEmail
Dim Recipient
Subject = "This is my form info to you"
SenderEmail = "form@domain.com"
Recipient = "me@mydomain.com"
' Get the form data
Name       = Request.Form("Name")
Address    = Request.Form("Address")
City       = Request.Form("City")
State = Request.Form("Sate")
Zip    = Request.Form("Zip")
Email   = Request.Form("Email")
Phone        = Request.Form("Phone")
Have You Had Surgery = Request.Form("Have You Had Surgery")
'create the body case information to be emailed
Select Case ucase(Subject)
case "Newsletter"
 "Name: " & Name & vbCrLf &_
 "Address: " & Address & vbCrLf &_
 "City: " & City & vbCrLf &_
 "State: " & State & vbCrLf &_
 "Zip: " & Zip & vbCrLf &_
 "Email: " & Email & vbCrLf &_
 "Have You Had Surgery: " & Have You Had Surgery & vbCrLf &_
 
end Select
' 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
' Enter the sender data
msg.From = SenderEmail
' Note that as addRecipient is method and not
' a property, we do not use an equals ( = ) sign
msg.AddRecipient Recipient
' The subject of the message
msg.Subject = Subject
' And the body
msg.body = Newsletter

"Name: " & Name & vbCrLf &_
"Address: " & Address & vbCrLf &_
"City: " & City & vbCrLf &_
"State: " & State & vbCrLf &_
"Zip: " & Zip & vbCrLf &_
"Email: " & Email & vbCrLf &_
"Phone: " & Phone & vbCrLf &_
"Have You Had Weight Loss Surgery: " & Have You Had Weight Loss Surgery & vbCrLf &_
' Now send the message, using the indicated mailserver
if not msg.Send("mail.mydomain.com" ) 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>
aigb_mcd is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 06-15-2009, 10:21 AM Re: jmail email scrip Question
Novice Talker

Posts: 9
Name: zobin lee
Trades: 0
You must paste the error message here(Line and Description).
We had to know what extractly error message.
dopanel.com is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to jmail email scrip Question
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.10315 seconds with 13 queries