|
Hello,
I'm trying to use cfx_imsmail to send out a
newletter. In the newsletter I need to replace certain strings (tokens ??)
with values from a database query. From what i can see in the
documentation, the way to do this is to open a query then use the QUERY &
QUERYFIELD parameters to specify the query and the field in the query I
want to send the email to. How then do I specify something like "[name]"
to be replaced in the email with the name field from the database
??
This what i have so far ::
<cfscript>
htmlcontent = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html>
<head> <title>Untitled</title> </head> <body>
Dear [name],
<br><br> sdfasdf asd fa<br> sdf asfasf<br><br> <font >This is the email content, testing the ims sender....</font> <br><br><br> asfasdf !!!! </body>
</html>'; </cfscript> <cfquery name="getmembers"
datasource="test">
SELECT member_email, member_name FROM member_
ORDER BY member_id </cfquery> <cfx_imsmail query="getmembers"
QUERYFIELD="member_email" header_subject="This is a real test"
smtpfrom="[EMAIL PROTECTED]" header_from="IMS - VERVE" smtpto="[EMAIL PROTECTED]" body="Dear [name], Blah blah blah blah blah blah blah" html="#htmlcontent#"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
So then how do i use the token.... parameter to
specify that i want to replace the value "[name]" with the field "member_name"
from the query ??
** also.. for testing purposes - i've noticed that
if i have the same email address in the database multiple times - only 1 email
will be sent... is this correct ?? .. is there a way to override this
?
thanks in advance
Will
|
- Re: [iMS] token fields Will Blackie
- Re: [iMS] token fields Howie Hamlin
- [iMS] MAJOR mail server problem...Configurator suc... Kevin Langevin
- Re: [iMS] MAJOR mail server problem...Configur... Howie Hamlin
- RE: [iMS] MAJOR mail server problem...Configur... William Vernon
- RE: [iMS] MAJOR mail server problem...Conf... Kevin Langevin
- Re: [iMS] MAJOR mail server problem...Conf... DDB Lists
- Re: [iMS] MAJOR mail server problem..... Howie Hamlin
- Re: [iMS] MAJOR mail server probl... DDB Lists
