Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Old 12-13-2006, 10:16 AM JMail problems
blelisa's Avatar
Experienced Talker

Posts: 45
Location: Western New York
Trades: 0
I have got my JMail to send me an email. But what I want is to have included in the email some info from the form that was submitted.

Here is my asp code
Code:
<%
set connection=Server.CreateObject("ADODB.Connection")
connection.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &_
server.MapPath("data/hemicustreg.mdb")
connection.Open

sql="INSERT INTO [customer] ([cmpname], [address], [city], [state], [zip], [number], [contact], [email], [system], [pwrd], [username])" 
sql=sql & "VALUES" 
sql=sql & "('" & Request.Form("cmpname") & "',"
sql=sql & "'" & Request.Form("address") & "',"
sql=sql & "'" & Request.Form("city") & "',"
sql=sql & "'" & Request.Form("state") & "',"
sql=sql & "'" & Request.Form("zip") & "',"
sql=sql & "'" & Request.Form("number") & "',"
sql=sql & "'" & Request.Form("contact") & "',"
sql=sql & "'" & Request.Form("email") & "',"
sql=sql & "'" & Request.Form("system") & "',"
sql=sql & "'" & Request.Form("pswd") & "',"
sql=sql & "'" & Request.Form("username") & "')"

connection.Execute(sql) 

Dim MyMail
Set MyMail = Server.CreateObject("JMail.SMTPMail")
MyMail.ServerAddress = "mail.hemisphere.net"
MyMail.Sender = "lblendowski@magneforcess.com"
MyMail.AddRecipient "lblendowski@hemisphere.net"
MyMail.Subject = "New Registrant on Hemisphere.net"
MyMail.Body = "Request.Form("UserName")Thanks for signing up for our new online service!" 
MyMail.Execute
Set myMail=nothing
Response.Write("Your e-mail has been sent")

  if err<>0 then 
    Response.Write(Err.Description) 
  else 
    response.redirect("tyreg.html") 
end if
connection.close 


%>

Here is the error I get:
Microsoft VBScript compilation error '800a0401'

Expected end of statement

/hemisphe/prolg.asp, line 29

MyMail.Body = "Request.Form("UserName")Thanks for signing up for our new online service!"
-----------------------------^

Any ideas? Thanks in advance for any help!
blelisa is offline
Reply With Quote
View Public Profile Visit blelisa's homepage!
 
 
Register now for full access!
Old 12-13-2006, 05:50 PM Re: JMail problems
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
MyMail.Body = "Request.Form("UserName")
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-20-2006, 01:13 PM Re: JMail problems
Average Talker

Posts: 22
Name: Momo
Trades: 0
change line 29 to:

MyMail.Body = Request.Form("UserName") & "Thanks for signing up for our new online service!"
ophir.oren is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to JMail problems
 

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.12037 seconds with 12 queries