Brian Dunning's FileMaker Custom Functions

MailToEncode ( address , ccaddress , bccaddress , subject , body )

function to encode a message into a mailto url

  Average rating: 3.8 (56 votes) Log in to vote

Caspar Harmer   Caspar Harmer - Show more from this author
Digital Fusion Ltd

Share on Facebook Share on Twitter

  Sample input:
MailToEncode("";"";"";"Hi Bob";"Man, this function is just sooo incredibly handy. I love Caspar and all his work"
  Sample output:

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Takes email message data and encodes it into a "mailto" url.
allows a user to send mail from IWP easily. All they need to do is use the "Open Url" script step with MailToEncode as the url. 
Note: uses UrlEncode to encode non-standard text characters so they can be sent in the url

Main benefit: you don't need to know how to use "mailto" to send an email using IWP



Brian Rich   Brian Rich, Studley/Warks/UK
Jan 12, 2010
This plug-in works perfectly on a Mac using Firefox or Safari and Apple Mail.

On Windows XP nothing happens in Firefox or IE8 with Outlook. Safari says that Windows doesn't recognise the mailto command.

If I use FMP Client 10 or 9 Advanced, I see an error 5 (Command invalid) when I run the script which does the OpenURL. This doesn't happen on a Mac.

The application is hosted on FMP10 Server Advanced running on Vista Business. Is otherwise rock solid.
dzed   dzed, zedzedze
Oct 31, 2014
Stam Kapetanakis   Stam Kapetanakis
Dec 8, 2019
URLEncode function doesn't exist in FMP 18; the current function is called GetAsURLEncoded
With this substitution works as advertised.

Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 16 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: