June 4, 20205 yr I am using the script step "send mail" in FilemakerPro 16 to send emails, but what I would like is to include HTML code in the body of the email, such as: <table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><table border="0" cellspacing="0" cellpadding="0"><tr> <td align="center" style="border-radius: 3px;" bgcolor="#ff0000"><a href=" https://litmus.com " target="_blank" style="font-size: 16px; font-family:sans-serif;font-weight:bold;color: #ffffff; text-decoration: none; text-decoration: none;border-radius: 3px; padding: 12px 18px; border: 1px solid #e9703e; display: inline-block;"> I am a red button →</a></td> </tr></table></td></tr</table> I know this is not strictly a Filemaker problem, but could some kind person tell me how I can include this in the body of my email in such a way that the receiving email client (Gmail, Outlook, Apple Mail, etc) will interpret it as HTML and display my red button, not simply show my code as text!! Many thanks, Philip Caplan
June 4, 20205 yr You can't with the "Send Mail" script step. It can only send Text email, not HTML email, and because the email will be labeled as a pure text email the receiving party will not try to interpret it as HTML. If you upgrade to a more recent version of FM you can use the "insert from URL" script step to send out actual HTML email. https://www.soliantconsulting.com/blog/html-email-filemaker/ Or you can use a plugin Or you an integrate with your email provider's email API instead of relying on SMTP. https://www.soliantconsulting.com/blog/microsoft-graph-api-filemaker-one/
June 5, 20205 yr Author Hi Wim. Many thanks for your reply. When you say "Or you can use a plugin", can you recommend which plugins are available to do what I need for FMPro 16? Stay safe, Philip
June 5, 20205 yr No I can't. Because mostly I don't use plugins for that kind of work and will integrate with the APIs for sending email. Both Microsoft and Google are pushing hard to get people away from SMTP with its legacy authentication. So if you are developing something now, make it future proof and use an API.
June 5, 20205 yr I've never used it for this purpose, but the BaseElements plugin has a set of functions for handling SMTP email: https://docs.baseelementsplugin.com/category/401-smtp-email
June 10, 20205 yr You can switch to MBS FileMaker Plug-in for sending emails. Using SMTP via CURL functions, you can send emails. Check our SendMail functions to build email with/without HTML, multiple attachments and properly encoded names & texts. See this tutorial: Sending emails in FileMaker with MBS Plugin
Create an account or sign in to comment