ColdFusion Mail Merge?

Hi,
I am building a dynamic email and i wanted to see has anyone created a mail merge type email with ColdFusion?  I wanted the user to be able to have a set of fields to choose and type them into the body of the message.  When the email goes out, the fields like << First_Name >> or something like that would be replaced with the actual values from the db.
Any insight on how I could do this would be great!
Thanks,
-Westside

Piece of cake.  I do this sort of thing for neighborhood email blasts using a table that has everyone's name, email, etc., in it. Just use the rich text editor in a cfform to let the person compose the message - that gives them fonts, colors, etc., for formatting a nice message.  Come up with a simple meta syntax for how they type in the items that get replaced in the actual email with database items, just like you did in your example.   I wouldn't go the route of having the user type in using the #xxx# syntax because then you have to deal with possible errors when they spell things wrong, leave out a #, etc. Plus, the Rich text editor is going to mess with the # signs anyway.  Just come up with something like <firstname> or [firstname], etc.  Make it easy for the user by listing somewhere on the form page each of the possible things they can include - that way they can copy/paste if they want to.
On the form processing page you just loop over the database resultset and use replaceNoCase() to replace each of those metas with the current row's database value, and then drop that modified variable into the cfmail tag:
     <cfmail from="ME" to="#queryname.you#" type="HTML">
          #form.thisIsTheContentFormVariable#
     </cfmail>
If you're talking about sending a lot of emails you should check postings from about 4-6 weeks ago on the topic of using CF for mass mailings, and avoiding problems with your ISP that get you in hot water because they think you are a spam-bot.
-reed

Similar Messages

  • Anyone been able to get mail merge to work?

    I have a standard form that is currently being filled out
    manually, we would like to add it to our intranet so it could be
    filled out and submitted electronically. I have Ben Forta's book
    "Advanced Macromedia Coldfusion: Application Development Kit" and
    found the section where he talks about how to achieve this, but for
    some reason it just wont work on my system.
    I have Coldfusion 6.1 running locally and Word 2003 loaded.
    I have tried many many ways and have worked on just getting
    each step to work. It seems that the page will hang if it has to
    open a Mail merge main document. It will open a normal document and
    then I can pull text from that document and output it to the page,
    but I want to be able to open a mail merge document and have it
    perform a merge using either a text file or an access database as
    the data source. I am hoping that someone out there can shed some
    light on my problem. Thanks for reading, sorry it is kind of a
    lengthy explanation.....

    These release notes provide late-breaking and release information for Cisco? NAC Appliance, formerly known as Cisco Clean Access (CCA), release 4.1(1). This document describes new features, changes to existing features, limitations and restrictions ("caveats"), upgrade instructions, and related information.
    http://www.cisco.com/en/US/products/ps6128/prod_release_note09186a00807bb9f3.html

  • "Word was unable to open the data source" error message in mail merge

    I am trying to do a mail merge in Word 2008 for Mac and receive this message when I try to open the Excel file for the data.  Can someone please help?  I tried changing the filename to .xls (originally .xlsx) but it didn't work.

    As far as I know, you cannot merge from a  .xlsx data source in Mac Word 2008, and even though there is a KnowledgeBase article at  http://support.microsoft.com/kb/2604725 that suggests
    that all you have to do is "rename" to a .xls, I think what you actually have to do is open the .xlsx in Excel and use Save As to create a .xls.
    Generally speaking, you will be better off researching Mac Word questions in the relevant forum on Microsoft Answers, in this case here: http://answers.microsoft.com/en-us/mac/forum/macoffice2008-macword
    This particular issue was discussed in this conversation: http://answers.microsoft.com/en-us/mac/forum/macoffice2008-macword/cant-open-excel-file-for-mail-merge/90ccfd11-273f-4c2a-aa37-1d859b8e41e2?page=1
    If that does not help, and you cannot find anything else in the Answers group, I suggest that you post a new question in that group, referencing the above conversation and specifying your version of Mac OSX.
    Peter Jamieson

  • How do I get more target fields to apper in inspector for a mail merge?

    I am trying to do a mail merge from a Numbers spreadsheet to a Pages document. The spreadsheet has three columns: first name, last name, units. When I choose and add the merge fields to inspector the target fields 'first name' and 'units' appear but no target field entitled 'last name' appears. I can't figure it out.

    Which version of Pages?
    Peter

  • When I tried to Mail Merge for Data is is not exporting any data.

    HI,
    EBS-12.1.3
    DB-11gR1
    OS - RHEL 5.6
    [With my Login User and SysAdmin Login User] When I enter into to the "People -> Enter and Maintain" Form and then I press the "Export Button", there is error Alert
    Function is not available to this responsibility. Change Responsibilities or Connect to the System Administrator
    I Added the Function "HR ADI Seeded Integrator Form Functions" into the "AE HRMS Manager" Responsiblity. It is also working and Export Data icon is enable.
    Problem:
    But Problem is when I tried to Mail Merge for Data is is not exporting any data.
    ====================================================================
    Steps
    1.Move to the "People -> Recruirment" and then "Request Recruitment Letter" .
    2. Enter the New Request. as
    Letter Name "App. Letter Contract Site",
    Automatic or Manual = Manual.
    Select the Name from the LOVs for the Request for Detail Block.
    3. Press the "Export Data" icon.
    4. Integrator Page Appear with my Custom Integrator Name as "Appointment Letter - Contact Site".
    5. Select the "Word 2003" from the View List. and Reporting is Checked.
    6. Review the Folowing Enteries as:
    Integrator Appointment Letter - Contact Site
    Viewer Word 2003
    Reporting Yes
    Layout App. Letter Contract Site
    Content XXHR_MBE_APP_LET_CONT_SITE_V
    Session Date 2011/08/02
    Mapping XXHR_MBE_APP_LET_CONT_SITE_V Mapping
    7. Press "Create Document" Button.
    8. It will open the Excel 2003 and then Word 2003. But no data down download from the Form.
    9. It open the Mail Merge Letter but no Data is Display.
    ===========================================================
    Note:
    a. I am following the Steps from the Link:"http://apps2fusion.com/at/38-ss/351-generate-recruitment-letters-web-adi".
    b. From the "Desktop Integrator Manager", "Oracle Web ADI", "HRMS Web ADI", it is working fine and Dowload the Data.
    ===========================================================
    Thanks
    Vishwa

    Please try the solution in ("Function not available to this responsibility" Error While Cliclking On Forms Personalisation [ID 1263970.1]) and see if it helps.
    Thanks,
    Hussein

  • New to Pages, mail merge help needed

    OK, I tried to get some help a couple of days ago in the Numbers discussion pages but apparently the invoice I'm trying to create won't work. (At least, no one has replied to the other post.)
    So I've given up on trying to create a usable Invoice in Numbers ('09) for my friend's graphic design business and am now trying to use the Invoice template in Pages ('09) instead.
    I've managed to insert Mail Merge fields in the document and link them to a stand-alone Numbers document containing the client addresses. However, when we open the template to try and create a new invoice, the Pages>Edit>Mail Merge option only allows us to select the table containing the addresses, not individual addresses. The result is that Pages only imports the first person in from our database (the Numbers table).
    If anyone out there can offer help - even if it's just to say "forget it, you're better off writing things out by hand" - I'd really appreciate it.
    Another issue for the Invoice I'm trying to do in Pages is use the Inspector to create a Pop-up cell.  Apparently, that is only an option in Numbers.  But if I can get some help on the first issue, I figure something else out.
    I won't bother posting a screenshot or anything unless someone really needs it. (Maybe that's why I didn't get help before...)

    Thank you for the reply - the video was very helpful!
    AnaMusic wrote:
    Perhaps this  >  http://macmost.com/using-mail-merge-in-pages.html
    can offer some assistance on Mail Merge...
    I can now get the Mail Merge to pull up separate pages in a document for everyone on the list.
    I did some more checking on the MacMost site, but didn't find an answer for the next part of my problem:
    Being able to select different people from the Numbers table before completing the Mail Merge. Since we haven't yet entered her full client list into the database, I can simply delete an invoice that doesn't apply from the resulting mail merged document. My worry is in having to do that once we have her full client list (about 200 names so far) in that database.
    I've tried to see if it made sense to break the list into separate groupings, but even an alphabetical grouping (A-G, H--N, etc.) seems odd. I know I was able to make selections when I used Microsoft Word mail merge - do you know if Pages has something similar? (I know, Pages isn't meant to be an Apple clone of Word, but it's hard to know if I'm just looking in the wrong place on the forums and in the manuals/user guides.)
    Thank you again!

  • I get an error trying to use Apple Address Book with Word Mail merge - says it cannot open data file?

    I am running MS Word 2011, latest Mac OS, and trying to use the Mail Merge option with the Apple Address Book as the data source.
    However whenever I select the Apple Address Book as the data source, I get the error "Word was unable to open the data source".
    Anybody got any idea why?
    Thanks for your help

    I am guessing you could have solved this little problem already but perhaps someone else may benefit:
    I struggled with the same problem - not being able to use Mac Address Book (i.e. Contacts) with Word 2013 for mac mail-merge (on Mountain Lion and, now, on Mavericks) - with the exact same error message reported by Klausngigtoas above .
    So I read lots of techie stuff on forums which passed a nice few hours but didn't help. Finally, with slumped, defeated expression, I gave up.
    But I just now (such is life) I accidentally stumbled upon the simple solution:
    1. Enter System Preferences and click Security & Privacy.
    2. Select the Privacy tab and then on Contacts on the left hand panel.
    3. In the right hand panel ("Allow the apps below to access your contacts") just tick the Contacts box.
    4. And Voilà! - at least it worked for me - hope it does for you.

  • Why is my header/footer missing when I mail merge in Word 2013?

    I have just converted from Word 2007 to 2013 and now I am having an issue with my mail merge document. My mail merge document has our company letterhead set up in the header/footer. When I finish the mail merge by selecting 'Edit Individual Documents' using
    an Outlook contacts list - the first page is missing the header/footer but all the others are correct. 
    I use this document and mail merge every few days so this is going to cause me much grief if it can not be resolved.
    I have never experienced this issue before and I consider myself an advanced Word user.
    Has anyone else had this issue and knows how to fix it?

    Hi,
    According to your description, my understanding is that the first page of the Word document lost
    the header/footer, but the other page display well.
    If it is, please try the methods and check if it is helpful:
    Click on File>Options>Display and make sure that there is a tick mark in the box for "Show white space between pages in Print Layout view."
    Then, do you use DOC file (Create in Word 2007) or DOCX file?If
    you use Doc file, I recommend you convert it to DOCX file to test.
    If I misunderstand something, please let me know.
    Regards,
    George Zhao
    TechNet Community Support

  • Email PDF from Mail Merge Problem

    Using a data source of email addresses from Excel 2003 and performing a mail merge in Word 2003 with the Mail Merge to Adobe PDF button, everything worked okay and the emails generated to the outbox in Outlook 2003 with the relevant PDFs attached.  However, once they were mailed the recipients who use Outlook Express had the attachments missing.  I'm using Acrobat 8.1.5
    I've seen previous queries about this and it seems to relate to Outlook using a RTF format.  I set Outlook to default to html and then plain text formats but still had the same problem. Can anyone suggest how I can solve this or if the problem is Outlook related, then another email program that would work without causing this problem (preferable freeware or inexpensive).
    Thanks

    Just an interesting after thought, since you mentioned blocking. Several federal agencies and companies block zip files also. I ran onto a message recently about the university blocking zip files at one time because of a problem. Mail merge files are typically personalized and it would be nice for them to go intact. If they re not personalized, but just being sent in general, then posting the basic file and e-mailing a link might work better. For a lot of things I do, I just use the mail merge that is built into my e-mail client. That creates a mail-merge of messages that are personalized.
    Just thought the blocking comment might be of interest, though I give the same advice. I am not sure how it could be done with zip in a mail merge sense.

  • BP Information in a Mail Merge Spreadsheet Format

    Hi Guys,
    I need to run a report that I can export to excel that will allow me to export BP details (ie name and address) in a format that will allow me to mail merge the addresses into a Word Document for a mailing campaign.
    I have looked through the standard B1 reports/queries and cant find anything there. As I am a little bit dumb regarding the query generator I would be very grateful if anyone has done this previously, if they could post the queries details.
    Many thanks in advance
    Sean Martin

    Hi Sean,
    You can achive it without using query, just follow the following steps.
    Open Business Partenr master screen.
    In find mode put * in code and click on find
    then click on form setting
    Select the fields you want to export to excel
    click ok
    again use find, you will find all the fields in find list, now use export to excel button
    Hope it helps,
    Samir Gandhi

  • Mail merge and print one document at a time?

    Hi all. I'm an Apple revert. I'm currently using the i7 iMac. Previous Apple computer was a //e.
    I print an 8 or 12 page newsletter for my work. I want my printer/copier to fold and staple each document individually. Pages seems to send all documents to the printer in one huge file. How do I mail merge and print one document at a time?
    [In Windows Publisher, there's a registry hack to make Pub print one at a time. Anything similar on a Mac?]
    Mike

    Hello
    As you saw wrongly my first name I'm not too surprised that you missed the beast
    In fact it's not surprising that you missed it.
    I prepared the archive but forgot to upload it
    Download :
    For_iWork:iWork '09:découpe_PDFs.zip
    Yvan KOENIG (VALLAURIS, France) samedi 27 août 2011 11:29:37
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • How to use "Mail Merge for Word" to include only Account fields?

    We're attempting to use the Mail Merge for Word template to create a document containing several fields from the Account object. We do not need any fields from the Contact object, and there are many contacts linked to each account.
    When choosing "Get On Demand Data > Accounts", removing all the [Contacts] fields, selecting the necessary [Accounts] fields, then clicking "OK", a "List Download in Progress" window appears, followed by one that says "Microsoft Word - Subscript out of range". None of the [Accounts] fields are available in the downloaded data.
    Can anyone tell me how to include the appropriate Account fields without any Contact fields (which pulls a separate Merge record for every Contact linked with the selected Account)?
    Thanks.

    Thanks for trying to help with this.
    So far, we've been unable to pull even a SINGLE account record. So the problem is not related to data volume limitations. The tool seems to require that Contacts are selected, but for this application we only want a single merge document per Account.
    If anyone else has had success using the Mail Merge for Word tool to pull only Account data, please give us your guidance. Thanks.

  • Office 2010 mail merge with section breaks printing problem

    Afternoon all,
    We have an issue and I was wondering if anyelse has come across this and has a solution
    Our office staff do many mail merges and once the merge is complete they then can print the whole document with no problems or select one page and do print current page. The problem occurs when trying to print a range i.e. pages 5-7. Once you click print nothing happens, no errors and nothing comes out the printer.
    What I have found is that the mail merge is putting in section breaks between each page to seperate them but if I change these to page breaks in the document then I can select pages 5-7 and it prints with no problems.
    So the only solution I have found so far is to do a find/replace and find all ^b (section break) and replace with ^m (page break). This is obvioulsy takes more time and is a pain if we have to do this for every mail merge.
    I can't find any setting in the mail merge to tell it to use page breaks instead of sections breaks
    Has anyone else come across this probem, is it a office bug ???
    Any help would be great
    Darren

    John,
    Replying to your posts works just fine. You can choose to reply to either of the other posts & address both in your comments just as you did. I see quite a few threads where the OP (original poster) posts a reply to each & every one who has replied. I think it makes it very difficult to find the actual answers.

  • How do I add a dynamic hyperlink to an image in a CRM mail Merge?

    We have a mail merge template that is being used by a number of our sales reps.  The sales reps each have a unique URL they use to send out to potential customers.  Their unique URL is saved on their User record in MSCRM.  We want to
    send out marketing pieces to prospects but we need the ability to dynamically add the user's hyperlink to an image on the mail merge (ex: an image saying "Click here") and cannot find a way to do this.  Is this possible?

    Hi,
        This is not possible using OOTB CRM Marketing mail merge features for CRM 2013. However you can use 3rd party tools like Click Dimension for this Alternatively with MDM you are now able to use more advanced design features including what
    you are trying to achieve.
    http://www.microsoft.com/en-us/dynamics/marketing-customer-center/create-or-view-templates-for-email-marketing-messages.aspx
    http://www.microsoft.com/en-us/dynamics/marketing-customer-center/design-message-content-using-the-graphical-editor.aspx
    Hope this helps.
    Minal Dahiya
    blog : http://minaldahiya.blogspot.com.au/
    If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"

  • Is there a way to Automate or Script the Mail Merge Feature in iWorks?

    Hello,
    I've been trying to build a production management system slowly over the last few months, my boss is a bit of a technophobe so I've been trying as hard as i can to keep everything in familiar programs, at its core all the system has to do its take information in from Purchase Orders, this is added to a Numbers File, within that numbers file are our Open Order Book showing All orders and 2 "Merge Sheets" all new Orders are Added to the Merge Sheets then onto the Open Order Sheet, those "merge sheets" are then used as a data source for a Pages file "Job Card" (we have 2 job card files once blue one yellow but the process is the same)
    Up until now I've been manually merging each time we get a new order, but this happens a lot so what I've been trying to do is Automate the procedure.
    Ive created 2 Automator Apps  each runs the same sequence just for the two different Job cards as follows:
    Get finder Item "Job_Card_Blue/Yellow" > Open Finder Item > a "watch me do" of mail merge > Print > Close Application without saving
    The Problem is the Watch me do is a bit of a clunky work around, if I could make it work without the mouse moving over the screen it wouldn't be so bad, even if I could somehow give Mail Merge a Keyboard Short Cut it would also be better.
    So my questions, after a large ammount of waffling:
    1) is there a way i can "see" and then edit the "watch me do" Script?
    2) is there a simpler work around im not seeing?
    3) is there an existing script of program I can use? (obviously i know there is Filemaker etc, if it was up to me I'd use a Database, but the owner of company is adimant i use office or easy programs, becuase it needs to be a system i can leave to him once my contract is up)
    Any Help or suggestions would be greatly appreciated!

    Yes I've created an Automator Application that does the job, but the "watch me do" function that does the Mail Merge is a rather Clunkey work around, as the mouse moves all over the place, thats the part i want to remove and replace with a script, or work out a different way around it that avoids the "watch me do" function.
    Is this Possible? or where/who is there i can ask to write me a script, im not a novice to scripting, but i am a novice to Applescript.

Maybe you are looking for