Skip 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.

Populating fields on email after attachment

Featured Replies

  • Newbies

I am trying to setup a small database in FMP8 that allows FMP to generate a file, save to a location and then attach this to an email for sending, I am stuck as the only script option for doing this seems to be the SAVE AS option and create file as an email attachment, this works fine but I would like to populate the email to, bcc, subject and Body with some information from the same database, any ideas on available plug-ins etc etc as I am totally stuck.

Hi there

You are right that you can save an attachment, but you then need to use the 'Send Mail' script step to address the email using fields from your database.

If you save the file using a variable as the file path you can then reference the file as an attachment.

Hope this helps

Matt

  • Author
  • Newbies

Hi Matt

Thanks for the reply, I have use the set variable in the script but once I fire up the send email I cannot find a way of inserting the file that has just been saved ?

Have looked at some plugins cant seemt o find a way.

Thanks

  • Author
  • Newbies

Hi Matt

Thanks for the reply, I have use the set variable in the script but once I fire up the send email I cannot find a way of inserting the file that has just been saved ?

Have looked at some plugins cant seem to find a way.

Thanks

  • Author
  • Newbies

Thanks for this works well although i would prefer not to embed the file in the dbase for obvious reasons, however I tried using a plugin called mailit and getting the script to insert the file using a contaciner and a reference couldnt get it to work. I have created a new script which enables the user to attach the PDF manually, in doing this I noticed that the email is set to plain text and does not use the signature in Outlook any ideas?

You don't necessarily have to embed the file in the database, that was mostly for convenience. As long as you can get the path from somewhere you can reference this in your variable.

You could for instance store records on a shared server. Or you could store files as a reference in your database, then temporarily import the field to a global field, export to the FM Temp folder and reference this to get the attachment. Of course this would require more error trapping in case the file was not available etc.

As for the Outlook signature issue, I use a Mac with Entourage and any emails created from FM have the default signature on them, although they are set to plain text. I think the plain text thing is a limitation of FM. You could try looking at the Outlook Manipulator plugins from Productive Computing, or any of the other email plugins if this is a requirement.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.