I'm almost there, but can't seem to pass the last_email_id variable
to the content variable.

<cfquery name="test" datasource="xSuite" debug>
        select distinct contact_id, fname, emailAddress, company
        from contacts
</cfquery>

<cfset last_email_ID=10>
<cfset content="Hey *firstName*, is your email still *emailAddress*? and do
you still work at *company*?. Is your id still *contact_id*?. Click here to
learn more http://www.xerthr.com/pr_e.cfm";>
<cfset
content=replaceNoCase(variables.content,"*firstname*","<:fname:>","ALL")>
<cfset
content=replaceNoCase(variables.content,"*emailAddress*","<:email:>","ALL")>
<cfset
content=replaceNoCase(variables.content,"*company*","<:company:>","ALL")>
<cfset
content=replaceNoCase(variables.content,"*contact_id*","<:cid:>","ALL")>
<cfset content=ReplaceNoCase(content, variables.last_email_id,
"<:emailID:>", "ALL")>

<CFOUTPUT QUERY="test" group="contact_id">
<cfset content=ReplaceNoCase(content, "pr_e.cfm",
"pr_e.cfm?contact_id=<:cid:>&email_id=<:emailID:>", "ALL")>
<cfx_imsmail query="test" queryfield="emailAddress" qtoken_fname="fname"
qtoken_email="emailAddress" qtoken_company="company" qtoken_cid="contact_id"
header_to="<:email:>" header_from="The Big Kahuna <[EMAIL PROTECTED]>"
priority="0"
header_subject="<:fname:>" SMTPFROM="[EMAIL PROTECTED]"
body="#variables.content#"
log="yes">
</CFOUTPUT>

The output looks like this:
Hey Jose, is your email still [EMAIL PROTECTED]? and do you still work
at Xert?. Is your id still 4?. Click here to
learn more
http://www.xerthr.com/pr_e.cfm?contact_id=4&email_id=
?contact_id=4&email_id=?contact_id=4&email_id=<
:emailID:>

This is also sending an email to each distinct email address.
(ie: I get 3 emails per unique email address since there are
3 records being returned from the query).
Is this because I'm specifying the query attribute of the cfx tag?

Thanks, Jose

-----Original Message-----
From: Howie Hamlin [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 26, 2002 5:22 PM
To: inFusion Support List
Subject: Re: [iMS] CFX_iMSMail Question


If the email id is not coming from the main query then you'll need to loop
over the cfx tag like:

<cfoutput query="xxx">
<cfx_imsmail ...>
</cfoutput>

This is much more inneficient than having all of the information in a single
query but it will work.

Regards,

Howie

----- Original Message -----
From: "Jose Gosende" <[EMAIL PROTECTED]>
To: "inFusion Support List" <[EMAIL PROTECTED]>
Sent: Friday, April 26, 2002 5:16 PM
Subject: RE: [iMS] CFX_iMSMail Question


> The problem is that my email_id doesn't come from the same
> query as my main query for CFX_iMSMail. I'm passing last_email_id
> as a variable (from the emails query). Do I also attach a variable
> in the form of qtoken_xxx?
>
> thanks, Jose
>
>
>


==^=======================================================
     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