473,395 Members | 1,571 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

CDOSYS with Variable for To: email address

Has anyone been able to use a variable for the To: line with CDOSYS? When I
put in a specific address like: myMail.To = "we*****@thisplace.org" it works
fine. When I put in a variable like: myMail.To = areaDirector it doesn't
work. I did a reponse.write on the areaDirector and it comes out like it's
supposed to: we*****@thisplace.org

Any ideas? Does it have something to do with the quote marks?
Dec 29 '05 #1
4 1785
I Use variables with CDOSYS all the time. Never had an issue ever.
It's essentially the same thing in the end. You got something else going on.
"Jess" <Je**@discussions.microsoft.com> wrote in message
news:2E**********************************@microsof t.com...
Has anyone been able to use a variable for the To: line with CDOSYS? When
I
put in a specific address like: myMail.To = "we*****@thisplace.org" it
works
fine. When I put in a variable like: myMail.To = areaDirector it doesn't
work. I did a reponse.write on the areaDirector and it comes out like
it's
supposed to: we*****@thisplace.org

Any ideas? Does it have something to do with the quote marks?

Dec 29 '05 #2
If you want tomsehting to pay around with this code uses variables for
everything as well and it all works fine.
http://www.powerasp.com/content/new/...ing_cdosys.asp
"Kyle Peterson" <ky*****@hotmail.com> wrote in message
news:e2**************@tk2msftngp13.phx.gbl...
I Use variables with CDOSYS all the time. Never had an issue ever.
It's essentially the same thing in the end. You got something else going
on.
"Jess" <Je**@discussions.microsoft.com> wrote in message
news:2E**********************************@microsof t.com...
Has anyone been able to use a variable for the To: line with CDOSYS?
When I
put in a specific address like: myMail.To = "we*****@thisplace.org" it
works
fine. When I put in a variable like: myMail.To = areaDirector it doesn't
work. I did a reponse.write on the areaDirector and it comes out like
it's
supposed to: we*****@thisplace.org

Any ideas? Does it have something to do with the quote marks?


Dec 29 '05 #3
tomsehting lol
"Kyle Peterson" <ky*****@hotmail.com> wrote in message
news:en**************@TK2MSFTNGP11.phx.gbl...
If you want tomsehting to pay around with this code uses variables for
everything as well and it all works fine.
http://www.powerasp.com/content/new/...ing_cdosys.asp
"Kyle Peterson" <ky*****@hotmail.com> wrote in message
news:e2**************@tk2msftngp13.phx.gbl...
I Use variables with CDOSYS all the time. Never had an issue ever.
It's essentially the same thing in the end. You got something else going
on.
"Jess" <Je**@discussions.microsoft.com> wrote in message
news:2E**********************************@microsof t.com...
Has anyone been able to use a variable for the To: line with CDOSYS?
When I
put in a specific address like: myMail.To = "we*****@thisplace.org" it
works
fine. When I put in a variable like: myMail.To = areaDirector it
doesn't
work. I did a reponse.write on the areaDirector and it comes out like
it's
supposed to: we*****@thisplace.org

Any ideas? Does it have something to do with the quote marks?



Dec 29 '05 #4
Jess wrote:
Has anyone been able to use a variable for the To: line with CDOSYS?
When I put in a specific address like: myMail.To =
"we*****@thisplace.org" it works fine. When I put in a variable
like: myMail.To = areaDirector it doesn't work. I did a
reponse.write on the areaDirector and it comes out like it's supposed
to: we*****@thisplace.org

Any ideas? Does it have something to do with the quote marks?


It has nothing to do with quote marks. I suspect you are assigning an object
reference to your variable rather than a string value. For example:

areaDirector = oRS("director")

In the above example, VBScript will assign the default property only as long
as the recordset object is open, while this variation persists beyond the
lifespan of the recordset:

areaDirector = oRS.Fields("director").Value


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Dec 30 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Andy | last post by:
Hi Aarron Your code below helped me move from CDONTS email to CDOSYS email. My one question is how do I set this CDOSYS email as HTML formatted email. As it is now it just sends straight text....
3
by: Serge Myrand | last post by:
Hi everybody, The following code for sending email (found on msn I think) works find when used in a .VBS file. I double click the file and the mail is send. When I use the same code in my .ASP...
21
by: tp | last post by:
HI..... I have made simpale web site inside that i am generating email page which send form as email. i have setup small business server with Exchange server 2003 and i have hosted my website...
9
by: tshad | last post by:
This is a problem that we saw before on our asp site, but don't know how to fix it. We are seeing it on our .net site also. We have our email sending from our Windows 2003 server with exchange...
3
by: Jess | last post by:
Hi, I'm sending an email with CDOSYS. In myMail.To = emailSubmitter <-When I use a variable here it doesn't send. When I use a specific address like anybody@anywhere.com it works. Here's how...
0
by: Larry D | last post by:
I have a client with a site that users can register at, we collect their emails, if they have one, in an Access db. I have a page that uses CDOSYS to send messages to those emails but I am getting...
0
by: david220 | last post by:
hi once members sign up to my site they get sent an email which contains there username/password which they enter on a sign up form. Once they've signed up the email is automatically sent using...
9
by: paulmitchell507 | last post by:
I have a file called email2.asp which I am using to mail data obtained from a SQL query. I would like to pass the holiday_ID value in the querystring attached to the end of the URL. It all works...
3
by: viki1967 | last post by:
Hi all. I have problem whit this email address: john.d'almonte@mydomain.com If email address contain apostrophe the send email ( I send with CDOSYS component) responde with failure. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.