Integrating FileMaker with Email part 1
Updated: Apr 6, 2022
When developing a FileMaker system. it's often useful to send or receive email so you can do things like; - Send automated messages - Send reports or documents - Store related emails sent from elsewhere
Really, the uses are only limited to your imagination and requirements and most of them are quite easy to achieve. For sending email you can either use the built in 'Send Mail' function or a 3rd party plugin.
Sending using the built in script step
For versions of Filemaker Prior to 10, you can only send using the client's Mail program. This is somewhat limiting, especially on the windows platform if you're using Microsoft Outlook - as its security measure prevent 3rd party software from generating a message without user intervention. This is slightly annoying if you're sending one message and no good at all if you want to send a batch. In these cases you're better off using a later version of FileMaker or the 3rd party option. However, sending a message via the user's Mail client, can be a good option if you just want an easy way to send a one off message to an address you hold in FileMaker.
Tip: If you've got a mail client that won't accept the
FileMaker Send Mail step, you can use the 'Open Url' Function instead like this;
For versions 10 and 11 of FileMaker the 'Send Mail' script step can be used to send mail directly from FileMaker. To do this you will need SMTP email account details. You can get these from your Internet Service Provider or System Administrator.
The advantage of using this method is that you can;
Send the mail in the background. This is useful if you need to send a notification of a user action, but don't necessarily want the user to be aware of it.
Send an Attachment (You can also do this using the client method above). Please note that currently FileMaker only lets you send a SINGLE attachment, if you want to send more than one you need to send a separate mail for each.
Automatically record the contents of the email/attachment in a related table. For instance, you might have a table of contacts and want to record email sent to each contact as a communications history.
The trickiest part of sending mail can be getting the security settings right. FileMaker allows you to set up SSL/TLS encryption and specify a username and password, however its error reporting is less than stellar - typically the only message you get is 'Message failed to send', this makes it very difficult to diagnose problems. We recommend setting up the same account in your email program and verifying that you can send that way first - this will ensure you've got all the correct details before you start writing your script and will give you a much better idea of what went wrong if it doesn't work (usually mail clients will tell you if the account name or password are wrong, FileMaker doesn't).
In Part 2, I'll explain the benefits of using a 3rd Party plugin. Come back soon!