Sending HTML Emails

For the email purist, the only valid email is a plain text email. For the rest of the world there's HTML email. Currently, FileMaker only supports native sending of plain-text emails.

The available Send Mail script step is certainly a capable solution for sending your plain-text emails - and solves the problem most of the time. You can use your own SMTP servers or send email via a free hosted email account such as Gmail, Yahoo or Hotmail.

If, however, your goal is to join the rest of the marketing world and make your email correspondence appear as clean and professional as the Apple's of the world, then you'll need to know how to make it happen within your solution.

This video provides the code and the know-how in order to integrate HTML Email sending within your FileMaker solution. True, you'll inevitably need a plug-in to make it happen, but with the new Perform Script on Server step, you can have the server send the email for you. No need to mess with client side configurations. Just create the script, put the plug-in on server and send your HTML straight from FileMaker!

AttachmentSize
HTMLEmails.zip105.26 KB

Comments

This is a very useful technique and came at just the right time. What tells the HTML code to loop through and get all of the line item rows?

The maximum number of iterations on custom function is 10,000 I think so keep that in mind. Of course, a 10,000 line item invoice is one which needs some serious help. :)

-- Matt Petrowsky - ISO FileMaker Magazine Editor

How would you recommend integrating image containers into this solution. I need to include in a signature. Thank you!

Anytime you're going to integrate images, you rarely want to include them as an attachment - if you can avoid it. Of course, you CAN attach items to an email, but pointing to a url on the Internet is the most common approach.

-- Matt Petrowsky - ISO FileMaker Magazine Editor

Good info Matt. I have been doing some similar work with html emails...but you showed me a couple of ways to make it more efficient. One thing I want to point out as far as initial grabing the html to start with...I have used the link that is usually on the email "View in Browser" then grabbed the source from there, saves a step. I have also used templates from services like Mail Chimp as a good starting point. What I usually do from there is open up in Dreamweaver and update the CSS and layout to my liking then bring back into FM.

CB

Yep, it's all a matter of what tools you're familiar with. Thanks for providing your tools.

I tend to save the emails I like within a category in my email app. There's no shortage of pre-existing designs.

Thanks for the tip about "View in Browser" in order to avoid the quoted printable step!

-- Matt Petrowsky - ISO FileMaker Magazine Editor

Hi Matt,
having difficulties of getting the html content (getlayoutobjectattribute("html.webviewer"; "content")) into a global variable (set variable) and pasting it (set field) into a text field on the server.
Any idea?
Thanks in advance ++werner

Hi Matt

First of all, many thanks for many good tutorials.

I have now worked with the html code and it works great, but I have a problem adding thousands of seprarator, currency and fixed number of decimals.

I hope you have the opportunity to help me with this problem?

Thanks in advance for your help

Regards Morten