EmailParser.PlainText
---------------------

Queries plain text of email.

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

MBS( "EmailParser.PlainText"; EmailID ) 

**MBS**( **"EmailParser.PlainText";** /\* Queries plain text of 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 plain text of email.  
For HTML only email, the plugin will extract text. This text may be okay for full text search, but not necessarily good to display to user.  
### 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](EmailParserSubject.md)"; $email )\]  
Set Field \[Email Parser::PlainText ; MBS ("EmailParser.plainText"; $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.HTMLToPlainText](EmailParserHTMLToPlainText.md)
- [EmailParser.Parse](EmailParserParse.md)
- [EmailParser.Release](EmailParserRelease.md)
- [EmailParser.Subject](EmailParserSubject.md)
- [IsError](IsError.md)

### Example Databases

- [Drag and Drop/for Mac/DragTest Email](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Drag%20and%20Drop/for%20Mac/DragTest%20Email.shtml#3ScriptAnchor_)

### 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.ParseFile](EmailParserParseFile.md) - [EmailParser.ProcessImageReferences](EmailParserProcessImageReferences.md)

[HTML Version](EmailParserPlainText.shtml)