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

This list server is Powered by iMS
"The Swiss Army Knife of Mail Servers"

To leave this list please complete the form at http://www.coolfusion.com/iMSSupport.cfm
Need an iMS Developer license? Sign up for a free license here: http://www.coolfusion.com/iMSDevelopers.cfm
List archives: http://www.mail-archive.com/infusion-email%40eoscape.com/
Note: You are subscribed as [email protected]

Reply via email to