3 Replies Latest reply on Oct 18, 2011 3:50 PM by philmodjunk

    Layouts and Emails



      Layouts and Emails


      I have created a solution that has multiple letters, each in its own layout. The main purpose is for these letters to be printed and have the merge fields populate for the specific recipient. I am now being asked if I can set it up to have one of the letters set to email to each of the recipients as well. I have done some digging and it looks like in FMP 10 this required a plugin to allow for this functionality. Is this still the case? Is there a work around in some fashion?

      The letter has a graphic letterhead and formatted text or I would just plug it into the proper field.

      Thanks for your help and time!


        • 1. Re: Layouts and Emails

          If you want to reproduce the layout inside the body of the email, you need a plug in. If it is acceptable to use an attachment, you can save the layout as a PDF and attach the PDF. Other than that, a calcualtion can be set up to produce a plain text version (no graphic letter head) of the email. Anything more requires a plug in.

          • 2. Re: Layouts and Emails

            Thank you as always for such a quick response Phil!

            Could you help me with the calculation to produce the plain text version?

            • 3. Re: Layouts and Emails

              There are two approaches you can take. Here is an example of the most straight forward approach:

              With either, click the arrow next to the message body box and select "by calculation" and enter an expression such as:

              "Dear " & YourTable::Salutation & "¶¶" & "We are so delighted that you placed an order with us..."

              And so forth. Simple text is entered inside quotation marks. You can include date from the current record (or a related record) in between ampersands (&) as shown above. The ¶ symbol is added by clicking a button labeled with this character and it forces a new line. I've used two here to double space down between the salutation and the message body.

              YOu can also but this type of expression in a calculation field and then your "calculation" in the send mail dialog is just a reference to this calculation field.

              A more sophsiticated approach allows you to set up a table of message template records where you type the message into a text field and include place holders for each field you want to use in the message. Then, your calculation uses the subsitute function to replace the placeholders with data from your fields. This approach can allow you to set up multiple form letters and then you just pick and choose for each report. It's also a bit more like your original merge layout in how you set it up.