Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASPMail and webform question

Status
Not open for further replies.

danielh68

Technical User
Jul 31, 2001
431
US
Hi.

I recently did my first asp form for our company website. It does the job, but it could stand improvement. One of the areas I'd like to see improved is the way the form information is presented to the recipient (form may be viewed at
To get to the point, can I include categories in the email that the sales people receive, like the categories on the form?

Currently, the recipient's email looks like this:
----------------------------------------------------------
Mr. Somebody
technician
Media Masters
PO Box 213
Fresno Ca.
96352
USA
588-683-7898
55
mrsomebody@hotmail.com
Hi, I want to know more about your product. Can you send me info?
----------------------------------------------------------

I would like the email to be dislayed to the sales people like this (below):

Name: Mr. Somebody
Title: technician
Company: Media Masters
Address: PO Box 213
City: Fresno Ca.
Postal Code: 96352
Country: USA
Phone#: 588-683-7898
Ext#: 55
Email: mrsomebody@hotmail.com
Website: Message: Hi, I want to know more about your product. Can you send me info?

Can anyone tell me what I'm missing from my code that prohibits this from happening?

Much thanks,
DanH
 
How about something like this:

Code:
bodytext = &quot;Name: &quot; & Response.Form(&quot;Name&quot;) & &quot;<BR>&quot; & vbcrlf
bodytext = bodytext & &quot;Title: &quot; & Response.Form(&quot;Title&quot;) & &quot;<BR>&quot; & vbcrlf
bodytext = bodytext & &quot;etc.......for the rest of the form items&quot;


Set objMail = CreateObject(&quot;CDONTS.NewMail&quot;)
objMail.from = Response.Form(&quot;email&quot;)
objMail.to = &quot;me@myserver.com&quot;
objMail.cc = &quot;him@myserver.com&quot;
objMail.subject = &quot;Put Your Email Subject Here&quot;
objMail.body = bodytext

objMail.Send

Set objMail = Nothing
Tony
 
Thanks Fester for the prompt response. So far, it works. Just curious, what is the significance of &quot;vbcrlf&quot;? What does it do?

Again Thanks for your help,
DanH

 
[tt]Visual Basic Carriege Return Line Feed just like <br>or pressing enter.


You should also validate the form so you don't get an empty form.
[tt]&quot;A Successful man is one who can build a firm foundation with the bricks that others throw at him&quot;[/tt]
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top