user text entered is not sent via email in a form

R

ryan

I am running Frontpage 2003 and I am getting the email sent to me but the
only data in it is part of the email message. There is not user entered data
in the email.
I am using this method:
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
to create the email message. Is this correct?
 
R

ryan

<%@ Language=VBScript %>

<%'response.buffer=true

Dim CR
Dim strMsg, Mailer, strError
CR = CHR(10)


Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
'Set Mailer = CreateObject("CDO.Message")

Mailer.FromName = "Internet - Puppy Name Test"

Mailer.FromAddress = "(e-mail address removed)"%> <!--Request("T9")--><%
Mailer.ClearRecipients
'Mailer.AddRecipient "Opal McAuley", "(e-mail address removed)"
Mailer.AddRecipient "Ryan McAuley", "(e-mail address removed)"
if request("T2") = " " then
response.write("no name")
end if


strMsg = "Tattoo #: 5UK" + Request("T10") & CR &_
"Last Name: " + Request("T2") & CR &_
"First Name: " + Request("T1") & CR &_
"Email: " + Request("T9") & CR &_
"Requested Reg'd Puppys Name: " + Request("T12") & CR &_
"Call Name: " + Request("T11")

response.write(strMsg)

Mailer.bodytext = strMsg

mailer.organization = "Chrys-haefen"

mailer.subject = "Puppy Name"

mailer.smtplog = "F:\chrys-haefen\cgi-bin\mysmtplog.txt"

mailer.wordwraplen = 50

'Mailer.RemoteHost = "mail.chrys-haefen.com"
'if not Mailer.SendMail then
' if Mailer.Response <>"" then
' strError=Mailer.Response
' else
' strError = "Unknown"
' end if
' Response.Write "Mail Failure occured. Reason: " & strError
'end if


set Mailer = nothing

'Response.Redirect("comfirmation_name.asp")

Is the code that will send the email message. The calling page is the actual
form that the user fills out.
And yes my webserver supports aspmail.
 
K

Kathleen Anderson [MVP - FrontPage]

Hi Ryan:
I didn't step through your code, but the first thing I notice is your line
breaks - the VBCrLf defined constant is the preferred method. The ASPMail
doc says: Under VBScript you can use the predefined constant VBCrLf. Simply
using a Chr(13) or a Chr(10) will not work --you must use both -- the VBCrLf
defined constant is the preferred method. A Carriage-return and line-feed
character are required to create a new line in the message.

--
~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/
blog: http://msmvps.com/spiderwebwoman/category/321.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top