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.