473,671 Members | 2,250 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Cre ateObject("CDON TS.NewMail")
Mail.From="Pete rsen, Tom" < doesn't work
Mail.From=Reque st.Form("reques tor") < 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 2052
"Tom Petersen" <pe****@sdsd.sd bor.edu> wrote in message
news:Oe******** ********@TK2MSF TNGP09.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.Cre ateObject("CDON TS.NewMail")
Mail.From="Pete rsen, Tom" < doesn't work
Mail.From=Reque st.Form("reques tor") < 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="(Pet ersen, Tom)<to******** *@aol.com>"

Brian Staff
"Tom Petersen" <pe****@sdsd.sd bor.edu> wrote in message
news:Oe******** ********@TK2MSF TNGP09.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.Cre ateObject("CDON TS.NewMail")
Mail.From="Pete rsen, Tom" < doesn't work
Mail.From=Reque st.Form("reques tor") < 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
8382
by: RIP | last post by:
The time came to upgrade the webserver from 2k server to 2k3 server. In 2k server, the primary web ran flawlessly day after day. I burned the web's files to disk, and put them into the new server, seemed to work til i came to a point where the script needed to mail some people. Script is written in ASP 3.0, and the error is Microsoft VBScript runtime error '800a01ad' ActiveX component can't create object: 'CDONTS.NewMail'
6
8164
by: vasanth kumar | last post by:
I am running the following script for sending e-mail thro web Set objCDOMail = Server.CreateObject("CDONTS.NewMail") objCDOMail.From = "vkumar@ugs.com" objCDOMail.To = "vkumar@ugs.com" objCDOMail.Subject = "Library books" objCDOMail.BodyFormat = 0 objCDOMail.MailFormat = 0 objCDOMail.Body = "hi" objCDOMail.Send
1
4066
by: Chris | last post by:
I get the follow error on a linux box that is running sun asp: CDONTS.NewMail.1 error '80020009' unable to connect to server The error occurs when the Send Command is Executed. Here is my code Dim objCDO 'CDO object ' Send it to ...
3
1624
by: sagar | last post by:
i tried to send a email through asp using codes given on the book. but there is an error saying: ActiveX component can't create object: 'CDONTS.NewMail' what's that error for.,,and how can i correct it.
5
27694
by: MichaelK | last post by:
What do I need to do to enable CDONTS om my macine to make it working I'm testing the code: Dim objCDO Set objCDO = Server.CreateObject("CDONTS.NewMail") objCDO.To = "xyz@xxxxx.com" objCDO.From = "zyx@zzzzz.com" objCDO.Subject = "TESST CDONTS MAIL" objCDO.Body = "SOME TEXT TO SEND OVER"
4
2063
by: Dr. Harvey Waxman | last post by:
I guess I should change from cdonts to cdosys. Since I am ignorant about asp I hope you forgive this basic question. There are two asp files for handling mail, the one that gets the info from a form and creates a form.asp to mail and the one that takes that file and mails it, mail.asp. I believe I can figure out what needs to be altered in the code for the first form.asp but what needs to be changed in the one that sends the email? Is...
1
3738
by: SSG | last post by:
Dear All, I am new to ASP , I am using Win XP pro .. I am trying to send mail thru ASP pgm... BW is the coding....... <% Sub send_email(email_from, email_to, email_subject, email_body)
3
3972
by: Hugo Lefebvre | last post by:
Is there a maximum number of emails CDONTS can handle in an asp script? I have different questions about this. Question1: example1: set objSendMail = createobject("CDONTS.NewMail") ...... objSendMail.To = emailto
3
3456
by: Prasad | last post by:
Hi all, I had to write a page in ASP which sends an email. I googled and was able to write the following code: <html> <body> <% Set Mail = Server.CreateObject("CDONTS.NewMail") Mail.To = "XXXXXXXXXXXX@XXXXXX.COM"
0
8476
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8821
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8670
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4225
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4407
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2812
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1809
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.