Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Sending E-mail for FMP 4.x

Featured Replies

The "Send Mail" script step in FileMaker Pro 4.x is extremely useful, but FMP does not send the mail itself: it passes the message onto the default mail client program on the machine that is running the script.

Unfortunately for Macintosh users, the only mail client software FMP4.x works with is Eudora and Claris Emailer.

However there is a work-around that uses the "Open URL" script step and the "mailto:" URL type. The mailto: string can contain subject and body information as well as the recipient address. The Open URL script step passes the data onto the computer's default web browser instead of the email client. It'll work as long as the web browser can send mailto: messages. This includes Netscape Navigator but currently excludes Internet Explorer (but check it yourself, things change quickly).

To make the magic happen, create a calculation text field that joins up all of the recipient, subject and body data into one long text string...

"mailto:" & emailfield & "?subject=" & subjectfield & "&body=" & bodyfield

...where "emailfield" etc are fields in the database with the relevant information.

Cc fields can also be specified: use the syntax "?cc=" but only include it if you have a Cc recipient. A case statement would take care of that:

Case(not IsEmpty(ccfield), "?cc=" & ccfield)

Note that because the subject and body fields will have some HTTP reserved characters in them (like <, >, &, spaces etc) they need to be "converted" into their http equivilents -- an easy task with the External("Web-ToHTTP", field) function. In this case the calculation will look like:

"mailto:" & emailfield & "?subject=" & External("Web-ToHTTP", subjectfield) & "&body=" & External("Web-ToHTTP", bodyfield)

OK we have the calculation text field done. Define a script that finds and sorts the records etc, and use the step "Open URL" based on the calculation field just created.

There are limitations to this method however: attachments won't work, and messages get queued in your email client, not sent immediately.

-----

Update.

Arrrrggghhhh!

The External("Web-ToHTTP") function is only available if the Web Companion plug-in is enabled. It probably won't be on client machines, in which case the Open URL step will create a new email message in the browser but the subject and body text won't appear.

There are two solutions: activate the WC plugin on all client machines (very undesirable, can cause port conflicts and open up security holes) or use the Substitute() function instead -- no downsides other than it's less elegant.

The Substitute() function requires hard-coding each text string equivilent individually, by nesting a separate Substitute function for each string -- a lot of work to do each posible equivilent. However for my application I found that just two substitutions -- space=%20, carriage return=%0d -- was enough for my purpose.

The calculation that I used with the Substitution() function looked like this:

"mailto:" & Emailfield & "?subject=" & Substitute(Substitute(subjectfield, " ", "%20"), "

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.