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.

Emailing PDFs from Server

Featured Replies

Since FM Server cannot make PDFs how is this for a scripted workaround:

  1. FM client makes the PDF in the TEMP user's folder on local PC.
  2. The PDF is inserted into a container field on the current record.
  3. Mother script calls PSOS subscript which finds proper record and exports container PDF to folder on server.
  4. Send Mail grabs the PDF from the folder and sends the email from the server.
  5. PDF is deleted from folder.
  6. PDF file is deleted from the container field (No need to keep it)
  7. Result (Success or Failure) is passed back to the mother script.

Sound feasible?

Sounds doable.

Alternatively you can use MBS Plugin functions on Server to work with PDF using PDFKit/DynaPDF functions or send email with more options.

 

  • Author

I think I hit a roadblock in step 3. I can't export field contents from the server.  It's grayed-out. 

A way can be to write a record to a todo table, have a FM Pro sitting somewhere which checks for those job records and does the PDF creation.

When PDF is created, it will put it in a record on the job record and mark it as done.

Later server can find the PDF and process it.

13 hours ago, Ted S said:

I think I hit a roadblock in step 3. I can't export field contents from the server.  It's grayed-out. 

Base Elements plugin will allow you to export a container field's contents, and works on the server.

  • Author
3 hours ago, Mike Duncan said:

Base Elements plugin will allow you to export a container field's contents, and works on the server.

Thank you Mike. I will give it a try.

Edited by Ted S

  • Author

Well, the Base Elements plugin was looking promising but it seems to be corrupting the PDF on export. If I export manually on my client PC using native FM, it works fine. If I export manually on my client PC using the BE plugin, the PDF won't open.

  • Author
8 hours ago, MonkeybreadSoftware said:

A way can be to write a record to a todo table, have a FM Pro sitting somewhere which checks for those job records and does the PDF creation.

When PDF is created, it will put it in a record on the job record and mark it as done.

Later server can find the PDF and process it.

I don't think you're understanding the problem. Yes, I can email from the server but I can't create the PDF on the server. I can create the PDF on the client but I don't want to send the email from the client. So my thought was; create the PDF on the client and place it in a container field. Then call a PSOS script that finds the proper record and attaches the PDF to an email. The problem is: (1) I can't attach directly from a container. (2) Server cannot export field contents. (3) The Base Elements plugin can export but it corrupts the file in the process.

My thought would be that you *do* send it from the client - but using a SMTP server with the settings set to a generic address, so it doesn't look like the client machine sent it. It could have the same settings as the Server...

Would avoid the various workarounds described above...

  • Author
15 hours ago, webko said:

My thought would be that you *do* send it from the client - but using a SMTP server with the settings set to a generic address, so it doesn't look like the client machine sent it. It could have the same settings as the Server...

Would avoid the various workarounds described above...

I'm using this method currently but it has downsides. It requires remote users have a VPN connection so that their local PC can talk to our Exchange server. Emailing from the FM client works fine for those on on the LAN but remote users sometimes forget to activate their VPN. I'm trying to make it all simpler for everyone but me. Emailing directly from the FM server would mean the user has one less thing to remember; one less thing for us IT folks to troubleshoot.

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.