EmailParser.Subject
-------------------

Queries the subject line of the email.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [EmailParser](component_EmailParser.md) | [5.3](newinversion53.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "EmailParser.Subject"; EmailID ) 

**MBS**( **"EmailParser.Subject";** /\* Queries the subject line of the email. \*/  
**$EmailID**) /\* The ID fo the email parser.e.g. $Email \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| EmailID | The ID fo the email parser. | $Email |

### Result

Returns text or error.

### Description

Queries the subject line of the email.  
### Examples

Parse Subject, PlainText and HTMLText from email:

 Set Variable \[$email ; Value:MBS ("[EmailParser.Parse](EmailParserParse.md)"; Email Parser::Input )\]  
If \[MBS ("IsError") = 1\]  
 Show Custom Dialog \["Failed to parse email."; Middle($email ; 7; Length($email ))\]  
 Exit Script \[\]  
End If  
\#Show text:   
Set Field \[Email Parser::Subject ; MBS ("EmailParser.Subject"; $email )\]  
Set Field \[Email Parser::PlainText ; MBS ("[EmailParser.PlainText](EmailParserPlainText.md)"; $email )\]  
Set Field \[Email Parser::HTMLText ; MBS ("[EmailParser.HTMLText](EmailParserHTMLText.md)"; $email )\]  
\#cleanup   
Set Variable \[$r ; Value:MBS ("[EmailParser.Release](EmailParserRelease.md)"; $email )\]  
### See also

- [EmailParser.HTMLText](EmailParserHTMLText.md)
- [EmailParser.Parse](EmailParserParse.md)
- [EmailParser.ParseContainer](EmailParserParseContainer.md)
- [EmailParser.PlainText](EmailParserPlainText.md)
- [EmailParser.Release](EmailParserRelease.md)
- [EmailParser.Source](EmailParserSource.md)
- [IsError](IsError.md)
- [Text.ReadEMLXFile](TextReadEMLXFile.md)

### Example Databases

- [CURL/Email/Email Client](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/Email%20Client.shtml#1ScriptAnchor_)
- [CURL/Email/Email Parser and Preview](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/Email%20Parser%20and%20Preview.shtml#1ScriptAnchor_)
- [CURL/Email/Email Parser](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/Email%20Parser.shtml#1ScriptAnchor_)
- [CURL/Email/IMAP Email](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/IMAP%20Email.shtml#4ScriptAnchor_)

### Blog Entries

- [MBS Plugin Advent calendar: 23 - MailParser](https://www.mbsplugins.de/archive/2023-12-23/MBS_Plugin_Advent_calendar_23_/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 24th September 2015 , last changed 23th May 2024

  
[EmailParser.SourceWithoutAttachments](EmailParserSourceWithoutAttachments.md) - [EmailParser.WriteAttachment](EmailParserWriteAttachment.md)

[HTML Version](EmailParserSubject.shtml)