CDOSYS Form to Email Formatting

Reply

Join Date: Jun 2006
Posts: 5
Reputation: gilroda is an unknown quantity at this point 
Solved Threads: 0
gilroda gilroda is offline Offline
Newbie Poster

CDOSYS Form to Email Formatting

 
0
  #1
Jun 6th, 2006
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
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 5
Reputation: gilroda is an unknown quantity at this point 
Solved Threads: 0
gilroda gilroda is offline Offline
Newbie Poster

Re: CDOSYS Form to Email Formatting

 
0
  #2
Jun 6th, 2006
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
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 89
Reputation: msaqib is an unknown quantity at this point 
Solved Threads: 1
msaqib msaqib is offline Offline
Junior Poster in Training

Re: CDOSYS Form to Email Formatting

 
0
  #3
Jun 7th, 2006
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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 1
Reputation: gull is an unknown quantity at this point 
Solved Threads: 0
gull gull is offline Offline
Newbie Poster

Re: CDOSYS Form to Email Formatting

 
0
  #4
Dec 16th, 2007
Originally Posted by gilroda View Post
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 4813 | Replies: 3
Thread Tools Search this Thread



Tag cloud for ASP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC