Sending HTML Emails
While younger generations of Internet users are increasingly adopting communication tools like Discord, it's challenging to envision a future devoid of at least one distinctive means of communication - email. Could a world without email imply that government agencies, utility providers, and other entities transmit messages based on your DNA sequence, linked to your registered devices? The possibilities are intriguing.
But for the present moment, email remains a crucial part of our digital landscape. The transition toward a paperless society is still underway and is likely to persist for many decades to come.
So, the key question is, have you seamlessly integrated HTML emails into your FileMaker solutions? If not, rest assured that you'll acquire a comprehensive understanding of both implementation and troubleshooting when it comes to facilitating communication between FileMaker and an SMTP server. This video offers a practical script and in-depth insights into successfully sending multipart mixed emails. Whether your HTML email simply involves basic formatting, like bolding certain text, or incorporates intricate features like a logo-adorned letterhead, sending the email via SMTP is your destination. Let's make that journey a smooth one and ensure you're well-equipped with all the requisite knowledge.
Comments
FileMaker documentation in Dash?
Hi Matt - How did you get the FileMaker documentation into Dash. I use this app for just about everything else.
Thanks,
Doug
I had created them for myself.
It's only FileMaker 19 docs, since I've not investigated if you can download the 20 docs, Christian, over at MonkeyBread has also converted the docs. You can download his here.
https://www.monkeybreadsoftware.com/filemaker/files/Dash/
-- Matt Petrowsky - ISO FileMaker Magazine Editor
Authentication Failed error message (1627)
The Server Send Email script is apparently tripping up on line 110. I've entered the values in lines 45, 46, 49, and 50 from those we use in the current SMTP Options setup window (which work on our FMS v20.x server. They include: Outgoing SMTP Server is smtp.gmail.com; Port is 465; Connection encryption is SSL.)
I'm guessing that the value we use in the Authentication field ("Plain Password") might be the culprit. If so, how would I encode that in the script?
Cheers!
See my reply lower down
I replied on another comment but essentially you'll need to use an App password if you're going to use Google.
https://support.google.com/accounts/answer/185833?hl=en
-- Matt Petrowsky - ISO FileMaker Magazine Editor
Used the App Password
No dice--same error message. (I used the same App Password we use in the SMTP Options windoid in Send Mail [whcih works].)
OAuth 2.0
Very good.
Google mail now requires OAuth 2.0 to authenticate (or am I wrong?).
How does the script need to be modified to use it?
OAuth is browser based
You won't be using OAuth to authenticate with an SMTP server. That method creates a secure token, which you can't use. You are going direct. You have to create what Google considers less secure. You'll need to create an App password.
Since you know you're using SSL and you're ensuring certificate exchange then your only concern is the protection of that app password.
https://support.google.com/accounts/answer/185833?hl=en
-- Matt Petrowsky - ISO FileMaker Magazine Editor
Got it! Many trhanks
Got it! Many trhanks
OAuth vs SMTP with App password
HI Matt, Is this advice still the same? Claris has added Oath as a send mail option, and I thought that SMTP was basically going to be phased out for Google accounts.
I haven't tested this yet, but I assume using the app password would be an issue if you want to send the mail server side, as it cannot handle the 2FA? I'm also reading on the forums that App password is just a short term solution, as Google are offering it as a short term fix?
fromName and toName
Hi Matt -
If I remove the $fromName and $toName from the $parametersValid and send email I get the msg successfully sent dialog box. The problem is the email does not send.
line 92 under the $isHTML script steps I changed the
• Insert Text ;
From: %fromName% <%from%> - From:%from%
To: %toName% <%to%> - To: %to%
line 105 $message variable you have;
// Replace values
[ "%fromName%" ; If ( IsEmpty ( $fromName ) ; "" ; $fromName ) ];
[ "%from%" ; $from ];
[ "%toName%" ; If ( IsEmpty ( $toName ) ; "" ; $toName ) ];
[ "%to%" ; $to ];
What am I missing???
Never Mind, I just figured it out
From:%from% should have been From: <%from%> same for To and Reply