Jump to content

Sending emails with html code included


This topic is 1387 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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/

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 1387 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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