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.

Email scripts with IWP

Featured Replies

  • Newbies

I have a plugin named mail.it and it doesn't seem to work with IWP.

Anybody have any luck with email scripts in IWP?

Thanks,

Try using the Open URL script/button step with the following options:

"mailto:" & your_email_field

Works for me.

Sending emails with Instant Web Publishing and FileMaker Server Advanced.

This will open the user's email client, which has to be properly configured to work. The syntax for the URL is:

"mailto:" & EmailAddressTextField & "?Subject=" &

Substitute ( Substitute (

SubjectLineTextFieldName

; "?" ; "--QuestionMark--" ); "&"; "--Ampersand--") &

"&Body=" &

Substitute ( Substitute (

BodyTextFieldName & ""

; "?" ; "--QuestionMark--" ); "&"; "--Ampersand--")

The fields SubjectLineTextFieldName and BodyTextFieldName CANNOT contain a question mark or ampersand, so the substitute functions replace them with the text:

--QuestionMark-- and --Ampersand--.

EmailAddressTextField must contain a valid email address like [email protected]

The mailto: command will not be affected by pop-up blocking since it uses a different protocol then https and http which are passed to a web browser.

Normailly the mailto: is passed to Mail.app, OS X can also be configured to open Entourage, Outlook etc…as the email application.

You can also use PHP here is an example I created:

http://www.fmwebschool.com/resources/IWP_Email.zip

In Kindness

Stephen Knight

http://www.fmwebschool.com

  • 5 months later...

I like where this script is going but I think it's a bit better to substitute encoded special characters instead of substituting text. Just like %20 is a URL-encoded space, use %26 for ampersand and %3F for question marks. Also, substitute carriage returns (paragraph symbols) with %0A. YMMV, but %0A gets me a new line and a line break. If %0A doesn't work, try %0D or %0A%0D. (Reference)

Try this script instead:

Open URL [No dialog; 

"mailto:" & Database::Email & 

"?Subject=Sample%20Subject%20" & 

"&Body=" &

Substitute (Substitute ( Substitute (

Database::EmailMessage; "?" ; "%3F" )

; "&"; "%26")

; "PP (paragraph symbol)"; "%0A")]

Edited by Guest

  • 1 year later...
  • Newbies

There's a more comprehensive function UrlEncode that will perform the substitutions, at http://www.briandunning.com/cf/165 .

  • Newbies

it is working if you use fmp9 to share the database and is not working if you share with the server.

FMbutler autosender like nice

sucses

NvD

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.