It comes up time and again: “How can I send a formatted email from FileMaker?” You see, FileMaker natively supports only plain text emails; you’re on your own if you want rich text or HTML. But it is possible! Here’s a list of options for (nearly) painlessly sending HTML emails from FileMaker.
In this scenario, FileMaker uses AppleScript to send an HTML email through the Apple Mail client on OS X. Pretty much the only requirement is that the person sending the email has an email account configured in Mail. Of course, this isn’t something you can often depend on. It’s also exploiting an undocumented behavior, so I would be skeptical of its dependability with future versions of Mail. Still, it’s handy for its ease of implementation.
EDIT 03/08/2013: Cleaned up test settings; updated ancillary custom functions.
In this scenario, FileMaker uses an external function from the ScriptMaster plug-in to send an email. ScriptMaster provides an example function, but our demo provides an enhanced version that allows for pretty much every combination of features. You might even use it to send a plain text email with multiple attachments. (FileMaker natively support only a single attachment.) This approach gives you maximum features for relative ease of deployment. Oh, and it’s free! The catch is that Java is increasingly going out of fashion these days (speaking as an OS X user), so the plug-in may run into issues on some users’ machines.
NOTE 3/14/13: The function provided in this example occasionally fails to send the message, encountering an error like “no object DCH for MIME type multipart/mixed.” I suspect the solution might be found in threads like this one, but I no longer use ScriptMaster and have thus not pursued any resolution.
EDIT 3/14/13: Removed test addresses.
EDIT 11/06/12: Added required body tag to several tests.
EDIT 03/08/13: Updated test settings.
In this scenario, FileMaker posts parameters to a web service that then sends the email for you. All the client needs to do is post the parameters to a web server, which is good for compatibility across various client configurations. The web service can be in any language capable of providing an API accepting GET or POST requests. We’ve done it using PHP and Ruby.
GET is the easiest post method for FileMaker because all you need to do is load the URL in a web viewer. That means even FileMaker Go can send HTML emails using this approach. But the biggest drawback is that there’s an inherent character limit to GET requests. They’re also not as commonly supported as POST. POST requests are therefore the preferred method, provided your solution is capable of sending them. In FileMaker, this requires a plug-in. Most any utility plug-in will be able to send POST requests.
You don’t need to write your own web service to use this approach. You can also post to free services such as JangoMail. This approach can yield more advanced features like campaign management and analytics. It also supports GET requests, so you can run the demo on your iPhone or iPad if you wish. (The following demo requires a free JangoMail account to function.)
If you don’t mind spending a few dollars, consider purchasing a plug-in built specifically for email handling. It might be worth the features and time saved. I have very little experience with these plug-ins, but I’ve added a few to our comparison table based on their marketing materials. (My apologies for the formatting.)
EDIT 11/5/12: Also check out this handy plug-in comparison by filemaker-plugins.com.
|Method||To, From, Bcc||HTML||Rich Text||Plain Text||Edit in Client||Attachments||Header Support||SSL||iOS-Compatible||IWP-Compatible||Server-Side Compatible||Mac-Compatible||Win-Compatible||Plug-In Dependent||Comments|
|Web Service||Yes||Yes||Yes*||Yes||No||Yes||Full*||Yes||No||No||Yes||Yes||Yes||No+||Ruby/PHP on server|
- Feature possible, but not supported in our demo files
Mail clients will have varying support for HTML and CSS features. See Campaign Monitor’s handy reference for more detail on what many of the popular clients support.