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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FONTS & Mail Blast in ASP

Status
Not open for further replies.

CooterBrown

IS-IT--Management
Aug 17, 2001
125
US
Hello,
I have existing forms on the our intranet that are blasted to particular recipents depending on the form and the context therein. My question is this: The messages recieved are great as far as context and display configuration. There is a problem with readability on some of the forms. I would like to bold some of the headings and titles of the messages to make them more readable. How would I code this before it is blasted. I've tried something to the effect of:

strBody = &quot;<font color=red><b>Heading</b></font>&quot;

but asp treats this like a string literal as far as e-mail goes. In visual basic to change the color the code is similar to:

txtStrBody.font.color = vbRed

Is this anything like asp and vbscripting?
Your advice is greatly appreciated!
 
Hi,

Below is the code I use to send e-mails from forms, complete with HTML. It's either the MailFormat or BodyFormat setting that allows HTML formatting (I forget which). I hope this helps.

Code:
<% 

SUB sendMail( fromWho, toWho, Subject, myContent )
	DIM myMail
	SET myMail = Server.CreateObject(&quot;CDONTS.Newmail&quot;)
	myMail.MailFormat = 0
	myMail.BodyFormat = 0
	myMail.From = fromWho
	myMail.To = toWho
	myMail.Subject = Subject
	myMail.Body = myContent
	myMail.Send
	SET myMail = Nothing
END SUB

fromWho = &quot;storesite@myserver.com&quot;
toWho = &quot;brian@myserver.com&quot;
Subject = &quot;Storesite Account Request&quot;
myContent = &quot;A <B>new</B> Storesite account request has been submitted by &quot; & TRIM(Request.Form(&quot;contact&quot;)) & &quot; of &quot; & TRIM(Request.Form(&quot;company&quot;)) & &quot;.  <BR>Phone: &quot; & TRIM(Request.Form(&quot;phone&quot;)) & &quot;<BR>e-mail: &quot; & TRIM(Request.Form(&quot;email&quot;))

sendMail fromWho, toWho, Subject, myContent

Response.Redirect &quot;thanks.asp&quot;
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top