Re: ASPMail Help Request

by "Andre Crane" <andre(at)terracrane.com>

 Date:  Fri, 16 Nov 2001 21:57:09 -0500
 To:  "Blue's ArtHouse Graphics & Web Design" <blue(at)bluesarthouse.com>,
<hwg-techniques(at)mail.hwg.org>
 References:  hwg
  todo: View Thread, Original
Hey Blue,
Mailer.BodyText = Request.Form("Form")   is the incorrect line.

The following line will send every field in the form in a comma delimited
list, but that is sort of sloppy to read:
--------------------
Mailer.BodyText = Request.Form
--------------------

With Asp, the page that is the "action" of the form has all of the form
fields available to it via the forms collection. What you would normally do
here is assign specific form fields to the values in the Mailer object like
so:
----------------------------------------------------
Mailer.FromName    = Request.form("name")
Mailer.FromAddress = Request.form("email")
Mailer.RemoteHost  = "mail.cateringtoyou-stl.net"
Mailer.AddRecipient "Blue Tapp", "blue(at)bluesarthouse.com"
Mailer.Subject     = "[Web Inquiry] " & Request.Form("subject")
Mailer.BodyText    = "Name: " & Request.form("name") & chr(13) & chr(13) &
"Message text: " & Request.form("messagetext")
-----------------------------------------------------

The above would output an email like this:
-----------------------------------------------------
Name: John Doe

Message text:  Hello, I am interested in buying widgets. Please send me more
information.
------------------------------------------------------

If you have any other ASP questions, I would be more than happy to answer
them for you (I'm currently unemployed :))

Andre L Crane


----- Original Message -----
From: "Blue's ArtHouse Graphics & Web Design" <blue(at)bluesarthouse.com>
To: <hwg-techniques(at)mail.hwg.org>
Sent: Wednesday, November 14, 2001 6:09 AM
Subject: ASPMail Help Request


> (Okay I'm trying this ONE MORE TIME--I have sent this three times but it =
> is not being posted.  I apologize if you have seen this more than =
> once...)
>
> I am trying to set up an asp script for the first time and have one =
> question that I know someone out there will know the answer to.  I am =
> trying to use this form to send the contents of a submitted form to a =
> specified e-mail address.  I am receiving the e-mail but it is blank.  I =
> know the problem is this line:
> =20
> Mailer.BodyText   =3D Request.Form("Form")
> =20
> But I don't know the correct syntax.  What goes between the ""???  I =
> have been scouring the help files at the site where I got the form and =
> they assume I already know this.  The web site is =
> http://www.cateringtoyou-stl.net if you are curious.
> =20
> The script is below:
> =20
> <.%
> Set Mailer =3D Server.CreateObject("SMTPsvg.Mailer")
> Mailer.FromName   =3D "Catering To You"
> Mailer.FromAddress=3D "service(at)cateringtoyou-stl.net"
> Mailer.RemoteHost =3D "mail.cateringtoyou-stl.net"
> Mailer.AddRecipient "Blue Tapp", "blue(at)bluesarthouse.com"
> Mailer.Subject    =3D "Inquiry From Web Site"
> Mailer.BodyText   =3D Request.Form("Form")
> if Mailer.SendMail then
>    Response.Write "<html><head><title>Catering To =
> You</title></head><body><meta http-equiv=3D'refresh' =
> content=3D'1;URL=3Dhttp://www.cateringtoyou-stl.net/thankyou.html'></BODY=
>  ></HTML>"
> else
>    Response.Write "Mail send failure. Error was " & Mailer.Response
> end if
> %>
> =20
> TIA!
> Blue
> =20
>
>
> Blue Tapp
> Blue's ArtHouse Graphics & Web Design
> 705 North Florissant Road
> Ferguson, MO 63135
> (314) 839-0634
> fax: (314) 839-1557
> url: www.bluesarthouse.com
> e-mail: blue(at)bluesarthouse.com
> =20
> "Time to get a web site!"
>
>
>
>
>
>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA