Revamp? Upgrade? Change? Email

I upgraded from 19.6 to 21.1 (FMS and FMP). To do so include making all layouts in all of the 20 files have the same theme.

Functionally I did replace most of the layouts using Table-View with List-View. I got rid of some of the menu-options that were no longer used.

The only issue I encountered was with SEND-MAIL. In the AP CheckRegister file there is a script that creates the Positive-Pay text file, and attaches to email to send to Controller. A weekly event. I am the only user for this.

I get an error message. I have to close Outlook, rerun the script and it works.

I asked my coworker if she was getting it? No. Although yesterday when she ran the script to SEND-MAIL in the ARBilling file it would send the last on the list and then end.

It is sort email addresses alphabetically, then loops to send each invoice via email. It has the EXIT ON LAST OPTION. For some unknown reason, I got it to work by deactivating the script step to sort before the loop.

I just tried the Positive-Pay script, and it worked that yesterday it didn't.

That is my background on email. I know I need to revamp the process. I do not know "CURL stuff". I am not sure where to start.

Do I need to change how our Data Center has us set up for email? I need to find some examples of what to do? When we send, the most I have send in a session is 50. That is not a daily occurrence. I do not think I need to go to a 3rd Party email API, but to use our own MS API.

I would appreciate links to this topic.

The fact you say it throws an error and you have to close outlook, suggests to me that you are running this process using the Send Mail script step with the "Send via E-Mail Client" option on ?

If that's the case, then it might be an outlook thing not a FileMaker thing, as in that case FM is just offloading the sending to outlook to handle.

If you have your mail server credentials it might be worth trying to send it entirely within FM by specifying the SMTP details in the script step itself

Having said that, using the script step is not something a lot of people do. Personally I use the BaseElements plugin for email sending, and I offload all sending to a script on server (initiated via perform script on server).

BaseElements can be installed a server-side plugin, and has a couple of easy to use function calls for sending email - think of it as a wrapper for the curl process.

The other benefits are it can send html emails (the send mail script step cannot), and it is easy to attach multiple attachments either via path on disk, or via container field.

BaseElements can also return useful error information if the send process fails.

You can also go the curl route, but I'd recommend looking at the plugin first it's much easier.

If you're relyingon the send mail script step - especially if it is offloading it to the outlook client, you are relying on multiple sources of failure (different client machines, different Os, different versions of outlook etc..) It is best to consolidate this into a single point of email sending (the server) via a single process (plugin)

1 Like

Looking at the BaseElements website I do not see any mention of EMAIL regarding their plugin.

I am not concerned about HTML. Yes it is nice to make it have the logo and stuff. As a Payables person, 90% of the emails I get to receive our vendors' invoices are Text-Format email.

The existing script has worked well. Outlook has it peculiarity that the USER has to click for each email in the loop, that Apple-Mail did not require. For our volume, we never considered that an issue. I presume, using curl to go through the OUTLOOK-API that peculiarity is not going to happen.

This project will FORCE me to learn curl-processes. Now i need to find the examples to follow.

But I do appreciate the time

Do you use MBS FileMaker Plugin?

We have a few email sample files to send and receive.

See e.g.
MBS FileMaker Advent calendar - Door 12 - Sending Mails
or
MBS Plugin Advent calendar: 21 - SendMail

Thanks for the Links. I have a lot to ponder