Topic: send to mailing list


Redmanz    -- 11-10-2002 @ 8:29 AM
  Okay I have a working newsletter application I built, the application itself works fine sending out html newsletters. The next thing I would like to do is personalize the newsletters with something like

Dear #myQuery.firstname# #myQuery.lastname#

In my tests I have run so far I can send out the newsletter but only the first one is personalized and all the rest use that ones name? Any help appreciated

Question

Specialization is for Insects!


Webmaster    -- 11-10-2002 @ 10:29 AM
  You need to insert the cfmail within a loop..

I.E.

<cfloop query="myQuery">
   <cfmail goes here>
      Dear #myQuery.firstname# #myQuery.lastname#

      Blah Blah Blah
   </cfmail>
</cfloop>


That should do it Smile

Thanks,
Pablo Varando
EasyCFM.COM, LLC.


Redmanz    -- 11-10-2002 @ 3:35 PM
  Okay that worked great, thank you!

Now what I am trying to do is put a link on the bottom of each message with a remove me from list link. The link should have the users id included in it. I understand how to place id's into links etc. but for this application it does not seem to work. This is my revised code since the last post. The id is being pulled out of the loop with the user names etc.

To Delete Yourself from this Newsletter:
<a href="http://www.MyUrl.com/mail_delete.cfm?id=#sendmail.id#">Click Here</a>

Specialization is for Insects!

This message was edited by Redmanz on 11-10-02 @ 3:55 PM


webedge    -- 11-17-2002 @ 1:42 PM
  Try this!


<cfquery datasource="dsn" name="YourQuery">
  SELECT email
  FROM newsletter
</cfquery>
<cfmail to="#all.email#"
  from="you@yourdomain.com"
  subject="Whatever"
  query="all">


Dear #all.firstname# #all.lastname#

blah de blah

Regards,

You

********************************************************************************************
<a href="http://www.MyUrl.com/mail_delete.cfm?id=#all.id#">Click Here</a>
********************************************************************************************
</cfmail>



Works fine for my newsletter!

Phil

No matter how much you polish a turd, it's still a turd...

WebmasterEdge.com - Online resources for Webmasters


EasyCFM.COM ColdFusion Forums : http://archive.easycfm.com/forums
Topic: http://archive.easycfm.com/forums/viewmessages.cfm?Forum=12&Topic=64