Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Sets the HTML text of the new email.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
SendMail | 4.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
EmailID | The email reference number obtained using SendMail.CreateEmail function. | $EmailID |
Text | The HTML text for the email. Will be encoded by the plugin to quoted printable UTF-8. | Email::HTMLText |
Returns OK or error.
Create email and set content:
Set Variable [$EmailID; Value:MBS("SendMail.CreateEmail")]
Set Variable [$r; Value:MBS("SendMail.SetHTMLText"; $EmailID; $html)]
Sets the text as plain text and as html:
Set Variable [ $r ; Value: MBS("SendMail.SetHTMLText"; $EmailID; "<html><body>" & GetAsCSS(EMail::PlainText) & "</body></html>") ]
Set Variable [ $r ; Value: MBS("SendMail.SetPlainText"; $EmailID; EMail::PlainText) ]
Add inline graphics with placeholder in HTML:
Set Variable [ $EmailID ; Value: MBS("SendMail.CreateEmail") ]
# prepare HTML from field in FileMaker
Set Variable [ $html ; Value: "<html><body>" & GetAsCSS(EMail::PlainText) & "</body></html>" ]
# Replace $$img$$ in text with image.
Set Variable [ $html ; Value: Substitute($html; "$$img$$"; "<img src=\"cid:image1.png\">") ]
Set Variable [ $r ; Value: MBS("SendMail.SetHTMLText"; $EmailID; $html) ]
# now add a container
Set Variable [ $r ; Value: MBS("SendMail.AddAttachmentContainer"; $EmailID; EMail::ImageContainer; EMail::ImageName; "image/png"; "image1.png") ]
Set html with converting text field:
MBS( "SendMail.SetHTMLText"; $EmailID; MBS( "Text.TextToHTML"; MyTable::MyTextField ) )
This function checks for a license.
Created 3th September 2014, last changed 11st June 2021