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.

add record and send email in the same time

Featured Replies

  • Newbies

Does anyone know how to make a script that notifies me via e-mail when a record is added over the web and how to start a script to send e-mail?

Thanks,

In the web form that creates a new record, add the following:

<input type="hidden" name="-MailHost" value="YourMailHost">

<input type="hidden" name="-MailTo" value="YourEmailAddress">

<input type="hidden" name="-MailSub" value="New Record Added">

<input type="hidden" name="-MailFormat" value="MailFormat.txt">

MailFormat.txt is a text file in your Web folder which can contain CDML tags, if you like.

  • Author
  • Newbies

Thanks for the fast response. I tried but for some reason it is not working.

This is what I have on my form.

<FORM ACTION=FMPro METHOD=post> <INPUT TYPE=hidden NAME=-DB VALUE='TEST.FP3'> <INPUT TYPE=hidden NAME=-Lay VALUE='Web'>

<input type="hidden" name="-MailHost" value="mail.toronto.com">

<input type="hidden" name="-MailTo" value="[email protected]">

<input type="hidden" name="-MailSub" value="New Record Added">

<INPUT TYPE=hidden NAME="-format" VALUE="tc_reply.htm">

<INPUT TYPE=hidden NAME="-error" VALUE="tc_error.htm">

Thank You,

You will need some form of action tag; e.g. '-view'. You could also look at doing this from a script. The '-new' form that the web-user sends can also contain the '-script' tag.

All the best.

Garry

  • Author
  • Newbies

I had created the script to send an email. The script name is "sendemailtous". How should I put this on the form?

This is what I have on my form.

<FORM ACTION=FMPro METHOD=post> <INPUT TYPE=hidden NAME=-DB VALUE='TEST.FP3'> <INPUT TYPE=hidden NAME=-Lay VALUE='Web'>

<input type="hidden" name="-script" value="sendemailtous">

<INPUT TYPE=hidden NAME="-format" VALUE="tc_reply.htm">

<INPUT TYPE=hidden NAME="-error" VALUE="tc_error.htm">

I tried this but it is not working.

Thanks,

Make sure you have all the required tags:

-DB, -MailTo, -MailFrom, -MailSub, -MailHost, -MailFormat, any action tag.

I think you may be missing the -MailFrom and also the -MailFormat tag which refers to a text file at the same folder level as the other web pages.

Take a look at article #106108 on the Filemaker site. It talks about doing mail with a script plus another method.

http://www.filemaker.com/ti/106018.html

I am having similar problems and will be trying these steps too.

Does the script work directly from FM?

Are you using FM3; I noticed the .fp3 on your database name? If so it may not handle mail. In fact, which version are you using and which platform? Mail has some problems on the older Mac configurations.

All the best.

Garry

If the e-mail address is being entered the same time the record is being made, then it'll take two steps: first step creates the record, populates the field; second uses the field value to send the e-mail.

Often after creating the record there is a "confirmation" message: send the e-mail from here.

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.