View Full Version : email syntax question
gcapp
10-01-2002, 12:11 AM
I have an email syntax question:
My email client does not handle HTML format.
I have this asp code:
StrALL = StrALL & uCase("Event Location") & vbcrlf
StrALL = StrALL & "State: " & StrLocState & vbcrlf &vbCrLf
StrALL = StrALL & "Region: " & StrLocRegion & vbcrlf
StrALL = StrALL & "Country: " & StrLocCounty & vbcrlf
I wanted to do two things to this code if possible:
1)Can I get a line to come through bold and/or
2)can I get a line break?
I would like the email to come through like this:
EVENT LOCATION
State: New York
---then a line break---
Region: Western
Country: USA
Can this be done??
Thanks,
Gary
whammy
10-01-2002, 12:33 AM
Well, ASP and CDONTS can handle HTML just fine... but if your email client can't read HTML, then it won't understand a message that's formatted using HTML tags (so you're DEFINITELY not going to see any "bolded" text).
It's always a good bet to send email messages in text. The biggest clients for the company I work for, that send out near (or over) a million email messages a day (and these are newsletters that people opt to get, NOT spam) use text format unless the user specifically requests HTML format... for good reason.
:)
TCrusaderT
10-02-2002, 08:45 PM
greetings,
I am trying to obtain the exact results. Thus I feel that I can learn from you.
How do you create your e-mail using asp?
Please understand that I only know how to code HTML, but I'm willing to learn. I need to send out messages with predetermined content in the body.
My server now supports PHP as well.
Thanks for any support.
:)
whammy
10-02-2002, 10:50 PM
If your server supports CDONTS...
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.To = recipientemail 'This is a variable
objMail.From = "arealwebaddress@yourserver.com"
objMail.cc = "" 'who you want to copy
objMail.bcc = "" 'who you want to blind copy
'objMail.mailFormat = 0 'This is for HTML
'objMail.bodyFormat = 0 'This is for HTML
MessageBody = "Dear " & recipientname & "," & vbCrLf & vbCrLf
MessageBody = MessageBody & "This is a test message." & vbCrLf & vbCrLf
MessageBody = MessageBody & "=========================" & vbCrLf
MessageBody = MessageBody & "This message was sent to: " & recipientemail
objMail.Subject = "The Subject."
objMail.Body = MessageBody
objMail.Send
Set objMail = Nothing
Otherwise, I'd check out 4guysfromRolla.com and look at their email faq (P.S. This all refers to ASP, but I'm quite sure there are plenty of example PHP scripts to send email on the net too!).
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.