DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   ASP (http://www.daniweb.com/forums/forum62.html)
-   -   CDOSYS Form to Email Formatting (http://www.daniweb.com/forums/thread47190.html)

gilroda Jun 6th, 2006 4:21 pm
CDOSYS Form to Email Formatting
 
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

gilroda Jun 6th, 2006 6:29 pm
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

msaqib Jun 7th, 2006 4:30 pm
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.

gull Dec 16th, 2007 7:19 am
Re: CDOSYS Form to Email Formatting
 
Quote:

Originally Posted by gilroda (Post 222466)
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


All times are GMT -4. The time now is 11:10 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC