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
http://www.digitalfusion.co.nz

Share on Facebook Share on Twitter

  Sample input:
MailToEncode("Bob@bob.com";"dave@bob.com";"";"Hi Bob";"Man, this function is just sooo incredibly handy. I love Caspar and all his work"
  Sample output:
mailto:bob@bob.com?cc=dave@bob.com&subject=Hi%20Bob&body=Man%2C%20this%20function%20is%20just%20sooo%20incredibly%20handy%2E%20I%20love%20Caspar%20and%20all%20his%20work

  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

 

Comments

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
xqxqsxqsxqsxqsx
 
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 BrianDunning.com. 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 20 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: