944,206 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 5548
  • ASP RSS
Jun 6th, 2006
0

CDOSYS Form to Email Formatting

Expand Post »
Hi there,

I'm new to the forums and a programming novice.

I've set up a CDOSYS form to email (a newsletter sign-up) and I'm trying to get my form field data to display on separate lines after the form has been processed - like the following:

Name: [value]
Company: [value]
Email: [value]
Subscribe: [value]
Unsubscribe: [value]


Here's the piece of the code I'm having trouble with:

with oCdoMail
.Subject = "Newsletter Request"
.TextBody = Name: Request.Form("Name") & vbCrLf & "
Company: & Request.Form("Company") & vbCrLf & "
Email: & Request.Form("Email") & vbCrLf & "
Subscribe: & Request.Form("Subscribe") & vbCrLf & "
Unsubscribe: & Request.Form("Unsubscribe")
end with


Any help is greatly, greatly appreciated. I'm going nuts (easy to do as a non-programmer).

gilroda
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gilroda is offline Offline
5 posts
since Jun 2006
Jun 6th, 2006
0

Re: CDOSYS Form to Email Formatting

I figured it out. Here's the working code:

with oCdoMail
.Subject = "Newsletter Request"
.TextBody = "Name: " & request.form("Name") & vbcrlf & "Company: " & request.form("Company") & vbcrlf & "Email: " & request.form("Email") & vbcrlf & "Subscribe: " & request.form("Subscribe") & vbcrlf & "Unsubscribe: " & request.form("Unsubscribe")
end with
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gilroda is offline Offline
5 posts
since Jun 2006
Jun 7th, 2006
0

Re: CDOSYS Form to Email Formatting

Store all the values in a variable and then show them on the page. This would be easy to use and update at later stages.
Reputation Points: 9
Solved Threads: 1
Junior Poster in Training
msaqib is offline Offline
91 posts
since Sep 2004
Dec 16th, 2007
0

Re: CDOSYS Form to Email Formatting

Click to Expand / Collapse  Quote originally posted by gilroda ...
I figured it out. Here's the working code:

with oCdoMail
.Subject = "Newsletter Request"
.TextBody = "Name: " & request.form("Name") & vbcrlf & "Company: " & request.form("Company") & vbcrlf & "Email: " & request.form("Email") & vbcrlf & "Subscribe: " & request.form("Subscribe") & vbcrlf & "Unsubscribe: " & request.form("Unsubscribe")
end with

Hi,
this works great, but any ideas how to change the colour of the text such as changing "Name: " so it appears up in orange in the email sent.
Thanks, Matt
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gull is offline Offline
1 posts
since Dec 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: ASP XML - Help Needed ?
Next Thread in ASP Forum Timeline: how to export results from form as txt file





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC