Forum Moderators: open

Message Too Old, No Replies

cdonts email form

how to do it...

         

newnewbie1

9:48 pm on Nov 19, 2002 (gmt 0)

10+ Year Member



Hi!

I'm an ASP email CDONTS form, and it's working OK... It's just a fields with a To, From and Body field on it.

Here it is:
<% Option Explicit

Dim objEmail
Set objEmail = CreateObject("CDONTS.NewMail")

objEmail.From = request.Form("From")
objEmail.To = request.Form("To")
objEmail.Cc = request.Form("CC")
objEmail.Bcc = request.Form("BCC")
objEmail.Importance = request.Form("Importance")
objEmail.Subject = request.Form("Subject")
objEmail.Body = request.Form("Body")
objEmail.Send
Set objEmail = Nothing

Response.Write "<HTML><HEAD><TITLE>Project 13-1</TITLE><BODY><CENTER><B>Message Sent</B></CENTER></BODY></HTML>"

%>

It just sends an email, and the body is just one big message. So NOW, I want to add more fields to my email form, and send them as well

I want to have a form with the foljowing fields:

NAME
ADDRESS
ZIP
PHONE

and I want to send those values too... Do I need to somehow stuff all these form fields into the objEmail.Body field, or can I send them NAME, ADDRESS, ZIP, PHONE separately?

THANKS!

RossWal

10:23 pm on Nov 19, 2002 (gmt 0)

10+ Year Member



I think you normally see it stuffed into the body, possibly with vbcrlf linebreaks. Another possibility is to format a href url in the body that leads to a processing page and passes a querystring. Like

<a href=http://www.mydomain.com/myprocessor.asp?Name=BillyBob&zip=94941>Click Here to process email</a>

In this case you probably want an HTML formatted email instead of text.

HTH