PDA

View Full Version : Send email with variable address


Khaled
05-11-2006, 07:02 PM
Hi everybody...
I am making a webpage that sending an email, this page works fine when email addresses are constant like :
MSG.To="name@domain.com"
where MSG is the CDO.Message object.
But the problem appears when I try to assign a variable to MSG.To like :
MSG.To=RS("Email")
where RS is a record set object contain the email of the recepient in Email database field.
How I can do it ?
Thank you for any help.

miranda
05-11-2006, 07:20 PM
Your example shows the correct way to do this. What problem are you encountering? Post the error message so we can help you.

Khaled
05-13-2006, 12:10 PM
Hi miranda, how are you ?
The error message is only
error '8004020f'
And onother line contains file name and line number of code which contains the .Send method

miranda
05-14-2006, 04:19 PM
If your code works to send the email if you hard code it in then, did you do a response.write on the email address field to ensure that the value is correct? is the value of the field a valid email address?