• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

'mail merge' with html

LEGEND ,
Oct 10, 2006 Oct 10, 2006

Copy link to clipboard

Copied

I am attempting to send an html based bulk email that I want to merge with a
database to personally address each email to each recipent. The html
newsletter is saved to a database and is looped to mail.

How can I include the mail merged element (name) into the html and have it
merge properly when the mail is sent?

I keep getting #name# in the emails.

Thanks!


TOPICS
Advanced techniques

Views

556

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 10, 2006 Oct 10, 2006

Copy link to clipboard

Copied

I presume you are using a ColdFusion page. You need <CFOUTPUT>#name#</CFOUTPUT>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 10, 2006 Oct 10, 2006

Copy link to clipboard

Copied

The website is in CF, but the newsletter is in HTML and saved to the
database. I need it to merge, with the coldfusion which is sending the
emails, to produce the name and the html email that is inserted.

Here is what I have. The campaign.html is an html email that I need to merge
with the database to include the name.
Just need to figure how to put the #name# into the HTML so coldfusion first
evaluates the html and then the name inside of it.

<cfloop query="mailist">
<cfmail from="#campaign.emailfrom#" to="#mailist.email#"
failto="bounce@avemarialaw.edu" replyto="#campaign.emailreply#"
server="****" subject="#campaign.subject#">
<cfoutput>#campaign.html#<br /><br />
Your name has been provided to Ave Maria School of Law by the Law School
Admissions Council Candidate Referral Service.<br />If you wish not to
receive future communications, <a
href=" http://www.avemarialaw.edu/mailings/optout.cfm?email=#mailist.email#&name=#mailist.name#">please
click here.</a></cfoutput>
</cfmail>
</cfloop>


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 10, 2006 Oct 10, 2006

Copy link to clipboard

Copied

You could modify the HTML email to insert a distinctive placeholder for the name. For example:

Dear [[NAME]]:

Then use Replace() to replace the string [[NAME]] with the appropriate name in campaign.html (which is just a long string). Then send the revised text as the body of your email.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 10, 2006 Oct 10, 2006

Copy link to clipboard

Copied

LATEST
Yeah, thanks. I got that same answer and it works like a charm.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation