SendMail.SetSubject
-------------------

Sets the subject line.

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

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

**MBS**( **"SendMail.SetSubject";** /\* Sets the subject line. \*/  
**$EmailID**; /\* The email reference number obtained using [SendMail.CreateEmail](SendMailCreateEmail.md) function. \*/   
**$Text**) /\* The new subject line.e.g. "Hello World" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| EmailID | The email reference number obtained using [SendMail.CreateEmail](SendMailCreateEmail.md) function. | $EmailID |
| Text | The new subject line. | "Hello World" |

### Result

Returns OK or error.

### Description

Sets the subject line.  
If subject lines contains special characters, it is automatically encoded as UTF-8.  
### Examples

Set subject line:

 MBS ( "SendMail.SetSubject"; $Email ; "Hello World" )  
### See also

- [SendMail.CreateEmail](SendMailCreateEmail.md)
- [SendMail.GetSubject](SendMailGetSubject.md)
- [SendMail.PrepareCURL](SendMailPrepareCURL.md)
- [WinSendMail.CreateEmail](WinSendMailCreateEmail.md)
- [WinSendMail.GetSubject](WinSendMailGetSubject.md)
- [WinSendMail.SetSubject](WinSendMailSetSubject.md)

### Example Databases

- [CURL/Email/Batch Emailer](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/Batch%20Emailer.shtml#1ScriptAnchor_)
- [CURL/Email/Build and send Email](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/Build%20and%20send%20Email.shtml#1ScriptAnchor_)
- [CURL/Email/Build and send HTML Email with inline graphics](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/Build%20and%20send%20HTML%20Email%20with%20inline%20graphics.shtml#1ScriptAnchor_)
- [CURL/Email/GMail oAuth SMTP](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/GMail%20oAuth%20SMTP.shtml#5ScriptAnchor_)
- [CURL/Email/Office 365 oAuth SMTP](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/Office%20365%20oAuth%20SMTP.shtml#5ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Advent calendar - Door 12 - Sending Mails](https://www.mbsplugins.de/archive/2024-12-12/MBS_FileMaker_Advent_calendar_/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin Advent calendar: 21 - SendMail](https://www.mbsplugins.de/archive/2023-12-21/MBS_Plugin_Advent_calendar_21_/monkeybreadsoftware_blog_filemaker)
- [SMTP with OAuth for Office 365 in FileMaker](https://www.mbsplugins.de/archive/2022-11-22/SMTP_with_OAuth_for_Office_365/monkeybreadsoftware_blog_filemaker)
- [Sending email with a huge custom function](https://www.mbsplugins.de/archive/2021-06-26/Sending_email_with_a_huge_cust/monkeybreadsoftware_blog_filemaker)
- [Use Inline Graphics in Emails](https://www.mbsplugins.de/archive/2021-02-11/Use_Inline_Graphics_in_Emails/monkeybreadsoftware_blog_filemaker)
- [Email Script for FileMaker](https://www.mbsplugins.de/archive/2018-10-10/Email_Script_for_FileMaker/monkeybreadsoftware_blog_filemaker)
- [Sending emails in FileMaker with MBS Plugin](https://www.mbsplugins.de/archive/2016-10-03/Sending_emails_in_FileMaker_wi/monkeybreadsoftware_blog_filemaker)
- [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 6/2024, Seite 38](https://filemaker-magazin.de/neuigkeit/4277-Appetithappen-FMM_202406)

This function checks for a license.

Created 3th September 2014 , last changed 24th February 2018

  
[SendMail.SetSMTPUserName](SendMailSetSMTPUserName.md) - [SendMail.SetUse8BitMime](SendMailSetUse8BitMime.md)

[HTML Version](SendMailSetSubject.shtml)