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.

Issues With Emailing from FM Pro 11

Featured Replies

Hi,

I hope someone can help. I have a database that has a layout with seven coupons in it. Each coupon has a first name and last name field as well as a non-printable email address field. I want to have Filemaker create a PDF for EACH of the email addresses/records. So basically, the pdf would look the same to everyone, except their personal name would be in the fields and ONLY sent to THEIR email address. So far, I can either send one email to the current record or everyone's pdf to everyone. I am not real good at writing scripts. Basically, right now the file is called test.fp7 and the fields are "first name", "last name", "email" and "date".

If the customers name is "John Doe" I want the layout in the PDF, with "John Doe" in the name and sent to John Doe's email address and so on through the found set. I would be sending the email from the found set of records, so it could be 5 records or 500.

Any help would be greatly appreciated. I sold Macs for 15 years from 1984-1999 and have used Filemaker a lot, but never to send emails and I am stumped. I tried to attach the file but it won't let me. It only has 2 records in it to test right now, but I still couldn't attach it.

Thank You,

Jim

You would need to loop through the records. Also if you want to send them without using an email client, you would need to set up the SMTP settings.

Your script could look something like ( where contacts is your contacts table ) :

Go to Record [First]

Loop

Set Variable [$exportPath; Get ( TemporaryPath ) & "Coupon" & contacts::ID & ".pdf" ]

Save Records As PDF [ $exportPath; CurrentRecord ]

Send Mail [ SMTP Server ] // name your $exportPath as your attachement location here

Go to Record [ Next; Exit after last ]

End Loop

  • Author

Thanks for the reply. I am stumped as to where to type all this stuff in. I used the "set variable" command in the script. When I double click on it a box pops up with "name" "value" "Repetition" and the last two have a "specify button" next to them. HELP lol

The name of my file is "test", the layout I want included in the PDF is "Coupon". The fields are "first name" "last name" "date" "email address" "email address" field is non-printing

This is the mess I created :sad:

post-106539-0-52318300-1335933607_thumb.

$exportPath goes in the name entry box.

Get ( TemporaryPath ) & "Coupon" & contacts::ID & ".pdf" goes in thevalue entry box.

Leave repetition alone with the default 1

  • Author

Thanks again. I had it that way. The only issue is ID It says field can't be found. This is what I have. Test is the table name and coupon is the layout name. ARGHHHH. I thought this would be easy lol

Get ( TemporaryPath ) & "Coupon" & test::ID & ".pdf"

  • Author

“$exportPath; CurrentRecord” could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk.

I have it where it creates an email for each name in the database and puts in a subject, but I cannot get the layout to be created in a PDF with the fields. It simply creates new emails with a subject. Can I send you an electronic beer if you get this to work for me? Thanks!

  • Author

also I have no field "ID" like you mention. I have one layout with the fields I mentioned: The fields are "first name" "last name" "date" "email address" ......."email address" field is non-printing. Also I have no relationships. Thanks AGAIN

  • Author

would it be possible to send you the file? Thanks again!

test.fp7.zip

You missed some crucial information. Take a look at the modifications that I made to your file and then compare it to your orig one so that you understand.

test_MOD.zip

  • Author

THANK YOU SO MUCH!!!!!!!!!!!!!!!! PERFECT

post-106539-0-31409900-1336067827_thumb.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.