SendMail.SetRichText
--------------------

Sets the enriched text of the new email.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SendMail](component_SendMail.md) | [4.3](newinversion43.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "SendMail.SetRichText"; EmailID; Text ) 

**MBS**( **"SendMail.SetRichText";** /\* Sets the enriched text of the new email. \*/  
**$EmailID**; /\* The email reference number obtained using [SendMail.CreateEmail](SendMailCreateEmail.md) function. \*/   
**$Text**) /\* The rich text for the email. Will be encoded by the plugin to quoted printable UTF-8.e.g. Email::RichText \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| EmailID | The email reference number obtained using [SendMail.CreateEmail](SendMailCreateEmail.md) function. | $EmailID |
| Text | The rich text for the email. Will be encoded by the plugin to quoted printable UTF-8. | Email::RichText |

### Result

Returns OK or error.

### Description

Sets the enriched text of the new email.  
See also [SendMail.SetPlainText](SendMailSetPlainText.md) and [SendMail.SetHTMLText](SendMailSetHTMLText.md).  
You can read text content from file using the [Text.ReadTextFile](TextReadTextFile.md) function.  
  
This is not to be confused with RTF file format. Enriched text is described here:  
[http://en.wikipedia.org/wiki/Enriched\_text](http://en.wikipedia.org/wiki/Enriched_text)  
Please note that most email clients do not support this nowadays.  
### Examples

Sets rich text:

 MBS ("SendMail.SetRichText"; $EmailID ; "&lt;bold&gt;&lt;italic&gt;Hello, world!&lt;/italic&gt;&lt;/bold&gt;")  
### See also

- [SendMail.CreateEmail](SendMailCreateEmail.md)
- [SendMail.GetHTMLText](SendMailGetHTMLText.md)
- [SendMail.GetRichText](SendMailGetRichText.md)
- [SendMail.SetHTMLText](SendMailSetHTMLText.md)
- [SendMail.SetPlainText](SendMailSetPlainText.md)
- [Text.ReadTextFile](TextReadTextFile.md)

### Blog Entries

- [Sending Email with FileMaker via MBS Plugin](https://www.mbsplugins.de/archive/2014-09-29/Sending_Email_with_FileMaker_v/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 5/2014, Seite 25](https://filemaker-magazin.de/neuigkeit/3759-Appetithappen-FMM_201405)

This function checks for a license.

Created 3th September 2014 , last changed 8th March 2018

  
[SendMail.SetPlainText](SendMailSetPlainText.md) - [SendMail.SetSMTPPassword](SendMailSetSMTPPassword.md)

[HTML Version](SendMailSetRichText.shtml)