Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > CDOSYS with Variable for To: email address

Reply
Thread Tools

CDOSYS with Variable for To: email address

 
 
Jess
Guest
Posts: n/a
 
      12-29-2005
Has anyone been able to use a variable for the To: line with CDOSYS? When I
put in a specific address like: myMail.To = "(E-Mail Removed)" 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: http://www.velocityreviews.com/forums/(E-Mail Removed)

Any ideas? Does it have something to do with the quote marks?
 
Reply With Quote
 
 
 
 
Kyle Peterson
Guest
Posts: n/a
 
      12-29-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Has anyone been able to use a variable for the To: line with CDOSYS? When
> I
> put in a specific address like: myMail.To = "(E-Mail Removed)" 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: (E-Mail Removed)
>
> Any ideas? Does it have something to do with the quote marks?



 
Reply With Quote
 
 
 
 
Kyle Peterson
Guest
Posts: n/a
 
      12-29-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Has anyone been able to use a variable for the To: line with CDOSYS?
>> When I
>> put in a specific address like: myMail.To = "(E-Mail Removed)" 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: (E-Mail Removed)
>>
>> Any ideas? Does it have something to do with the quote marks?

>
>



 
Reply With Quote
 
Kyle Peterson
Guest
Posts: n/a
 
      12-29-2005
tomsehting lol


"Kyle Peterson" <(E-Mail Removed)> wrote in message
news:en$(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Has anyone been able to use a variable for the To: line with CDOSYS?
>>> When I
>>> put in a specific address like: myMail.To = "(E-Mail Removed)" 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: (E-Mail Removed)
>>>
>>> Any ideas? Does it have something to do with the quote marks?

>>
>>

>
>



 
Reply With Quote
 
Dave Anderson
Guest
Posts: n/a
 
      12-30-2005
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 =
> "(E-Mail Removed)" 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: (E-Mail Removed)
>
> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to send an email - cdosys.dll problem Akbur ASP .Net 8 04-13-2007 01:04 PM
CDOSYS email - create hyperlink in body? Beefminator ASP General 6 09-02-2006 02:28 PM
ASP CDOSYS SMTP Email attachments are being corrupted rschaeferhig ASP General 4 03-29-2006 10:53 PM
anyway to call cdosys email from within asp.net page? GJH ASP .Net 3 02-01-2006 11:55 PM
CDOSYS With Variable Not Working Jess ASP General 1 12-13-2005 05:26 PM



Advertisments