Our clients appreciate how easy it is to integrate email distributions within their FileMaker workflows. But, they almost always want to send HTML formatted email messages. This makes perfect sense because who among us has sent plain text email messages in the last fifteen years? Almost everyone includes some sort of signature or other fancy elements in their emails. Up until now we would just lower our eyes and tell our customers that they can’t do that natively in FileMaker. We would further explain that they would need to buy a plugin in order to format their email messages in HTML. This would then elicit disbelief, disappointment and ultimately consternation from our bewildered customers. Well, those days are in the past when you upgrade to FileMaker Pro 18 Advanced. FileMaker, Inc. has given us the tools to tell our clients that they can send HTML-formatted email natively within their FileMaker application! How exactly are we going to make this happen for our customers? Well, I’ll walk through how to do just that.
The first thing we have to understand is that we’re not going to use the standard Send Mail script step. Instead, we’re going to use the Insert from URL script because of its ability to harness the power of cURL with all of its components. Let’s take a look at the script.
- Lines 3-4: Grab the HTML from a field or file and insert it into a variable for later use – it’s an HTML email after all (more on this below)
- Lines6-7: Set the curl options into a variable:
- Lines 9-10: Capture the URL of the mail server into a variable as well:
- Lines 12-13: Send the email via the Insert from URL script step using the variables we specified earlier in the script
I’ve created a very simple example that bolds the word “mail” in an email message:
This is how the message will render in the recipient’s email client. Notice the word “mail” is in bold:
Here are a few good resources to help you maximize this email function:
cURL’s SMTP feature: https://ec.haxx.se/usingcurl-smtp.html
How to format your emails using HTML or inline CSS: https://www.w3schools.com/html/html_css.asp
We hope you’re as excited as we are about this improved email function. There are a lot of cool workplace innovation platform features in FileMaker 18 including the new import dialog, new calculation functions and an error logging function.
Join our mailing list to keep up with all of the new FileMaker 18 product features.