Forums
This topic is locked
myMail.To = <% variable %> is this right?
Posted 04 Jan 2004 12:18:27
1
has voted
04 Jan 2004 12:18:27 Adam Hussain posted:
Hi there, I have got the CDONTS item to work properly, so this message isn't about configuration, however I am trying to do the following:I have an email address stored in the database, now I want the email in the database to be the receipient, something like:
<font size=4><b>myMail.To = <i>[email from sql server]</i></b></font id=size4>
But how do I go about doing it? Do I create a recordset? Additionally, I also want to send the user data that is pulled out of the database as the main message.
Any ideas guys?
Thanks?
Replies
Replied 04 Jan 2004 20:23:34
04 Jan 2004 20:23:34 Dave Thomas replied:
define your databased email address in your code before you add it to the mail code.
Dim dbMailAddy
dbMailAddy = recordset.(email field).blah blah
code code
code code
MyMail.To = dbMailAddy
Regards,
Dave
UD4 | Flash 5/MX | Studio MX | SQL | Access | ASP/VBScript | XP-Pro
Edited by - UltraDav on 06 Jan 2004 05:12:01
Dim dbMailAddy
dbMailAddy = recordset.(email field).blah blah
code code
code code
MyMail.To = dbMailAddy
Regards,
Dave
UD4 | Flash 5/MX | Studio MX | SQL | Access | ASP/VBScript | XP-Pro
Edited by - UltraDav on 06 Jan 2004 05:12:01