using a comma in the from using CDONTS.NewMail

T

Tom Petersen

Is there anyway to display the comma using CDONTS.NewMail on the from
'object'

For example, when I send the email, I want it to say from: Petersen, Tom,
but when I rec. it only shows Petersen.

Set Mail=Server.CreateObject("CDONTS.NewMail")
Mail.From="Petersen, Tom" < doesn't work
Mail.From=Request.Form("requestor") < doesn't work, but Response.Write shows
it correctly
Mail.Body="Wow, commas, are really cool, well, not really" < works fine

I'm guessing since a real From address doesn't/can't contain commas, it is
validated here somewhere???
I was hoping for something like:
Mail.From=strLN & ", " & strFN
but that didn't work, oh and I see I would like a space too, is this
possible?

TIA
 
T

Tom Kaminski [MVP]

Tom Petersen said:
Is there anyway to display the comma using CDONTS.NewMail on the from
'object'

For example, when I send the email, I want it to say from: Petersen, Tom,
but when I rec. it only shows Petersen.

Set Mail=Server.CreateObject("CDONTS.NewMail")
Mail.From="Petersen, Tom" < doesn't work
Mail.From=Request.Form("requestor") < doesn't work, but Response.Write shows
it correctly
Mail.Body="Wow, commas, are really cool, well, not really" < works fine

I'm guessing since a real From address doesn't/can't contain commas, it is
validated here somewhere???
I was hoping for something like:
Mail.From=strLN & ", " & strFN
but that didn't work, oh and I see I would like a space too, is this
possible?

The only way I know of to use a "common name" with CDONTS is to logon with a
session.
See the section "Sessions and Logging On" at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnproasp2/html/usingcdofornts.asp.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top