3 Replies Latest reply on Jan 19, 2012 12:45 PM by philmodjunk

    Emailing- editing the message text before sending it, script help?

    PFilmGuy

      Title

      Emailing- editing the message text before sending it, script help?

      Post

      I am new to FileMaker Pro 11 on the Mac and have little FM scripting experience. I have seen it done and know a few minor basics. At work we have an organizational contact database a consultant designed for us. 

      I read through some of the posts on creating emails but not sure I found what I needed, or could understand it.

      Emailing (to Mac Mail)—

      I want to create emails to send to a found set. In some cases, I will want the email addresses all plunked into the BCC field in one email. In other cases, I'll want to generate a separate email for each organizaiton in the found set. Either way, I want to be able to format the text and use graphics in the email, so I want to be able to edit that email before it is sent.

      I've played around with the send mail feature some. To do what I describe above, however, it automatically sends the email out rather than simply generating it and letting me edit. I like how it allows me to put in the addresses, the subject line and any attachments. I just want to be able to do more than the simple text option for the message itself.

      Is there a way to generate this email for a found set and NOT have FM send it, so I can paste in or create my own formatted text for the message?

      The attached image is the script found in the "Email Compaign Management" Starter Solution, the one that goes with the little "mail" icon. Could I adapt this somehow so it will create emails for an entire found set? This script simply creates an email for a single contact I might be looking at on screen.

      Thanks!

       

       

       

       

      Screen_Shot_2012-01-18_at_6.15.55_PM.png

        • 1. Re: Emailing- editing the message text before sending it, script help?
          philmodjunk

          Either way, I want to be able to format the text and use graphics in the email, so I want to be able to edit that email before it is sent.

          FileMaker only sends out plain text emails, no graphics, no html formatting supported. To do those type of things from FileMaker currently requires using an email plug in of which there are several avaialable. You'd need to work with the plug in developer's info on how to use their product to figure out how to edit your outgoing emails.

          Working with plain text emails, if you wil be entering all the text, you can use the send mail script step, but have it pause with the dialog open so that you can enter text. If you want to produce a message that combines text form the database with text that you enter/edit manually, you can use a set field step to put this data in a text field and bring up this text field when you want to send an email. After editing the text in this text field, a buton you click can perform a script that sends an email that includes the text from this text field.

          The script that you have posted does not send email. It just sorts your recods into one of two different sort orders.

          • 2. Re: Emailing- editing the message text before sending it, script help?
            PFilmGuy

            Oops! Uploaded the wrong screen shot. Here is the correct one.

            This does what I would want it to do (close enough) for a single contact. Could I adapt the script to do this for an entire found set?

            • 3. Re: Emailing- editing the message text before sending it, script help?
              philmodjunk

              Much depends on the structure of your database and what layout is currently selected. It could be as simple as opening up the send mail step by double clicking it and changing the "current record" radio button to "multiple emails, one for each record in found set".