470,619 Members | 1,444 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,619 developers. It's quick & easy.

using a comma in the from using CDONTS.NewMail

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
Jul 19 '05 #1
2 1901
"Tom Petersen" <pe****@sdsd.sdbor.edu> wrote in message
news:Oe****************@TK2MSFTNGP09.phx.gbl...
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/de...gcdofornts.asp.

--
Tom Kaminski IIS MVP
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://mvp.support.microsoft.com/
http://www.microsoft.com/windowsserv...y/centers/iis/

Jul 19 '05 #2
Try this:

Mail.From="(Petersen, Tom)<to*********@aol.com>"

Brian Staff
"Tom Petersen" <pe****@sdsd.sdbor.edu> wrote in message
news:Oe****************@TK2MSFTNGP09.phx.gbl...
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


Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by vasanth kumar | last post: by
4 posts views Thread by Dr. Harvey Waxman | last post: by
1 post views Thread by SSG | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.