DragDrop.GetEmailSubject
------------------------

Returns subject of the specified email message.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DragDrop](component_DragDrop.md) | [2.7](newinversion27.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "DragDrop.GetEmailSubject"; droparea; Index ) 

**MBS**( **"DragDrop.GetEmailSubject";** /\* Returns subject of the specified email message. \*/  
**$droparea**; /\* The reference ID for this drop area.e.g. $dropHandle \*/   
**$Index**) /\* Optiona, zero based index of the received email. Default is 0.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| droparea | The reference ID for this drop area. | $dropHandle |
| Index | Optiona, zero based index of the received email. Default is 0. | 1 |

### Result

The email subject as text.

### Description

Returns subject of the specified email message.  
Index from 0 to [DragDrop.GetEmailCount](DragDropGetEmailCount.md) -1.  
  
For an email drag from Apple Mail, the function [DragDrop.GetPath](DragDropGetPath.md) may give the path to a copy of the email file in temporary folder.  
  
This is metadata provided by Apple Mail. Alternatively you can get more if you take the email source and use our [EmailParser](component_EmailParser.md) functions to read the email file.  
### Examples

Query subject of last email drop:

 Set Variable \[ $subject ; Value: MBS ( "DragDrop.GetEmailSubject"; $$dropview ; 0 ) \]   
Show Custom Dialog \[ "Email subject" ; $subject \]  
### See also

- [DragDrop.GetEmailAccount](DragDropGetEmailAccount.md)
- [DragDrop.GetEmailCount](DragDropGetEmailCount.md)
- [DragDrop.GetEmailMailbox](DragDropGetEmailMailbox.md)
- [DragDrop.GetPath](DragDropGetPath.md)
- [DragDrop.RegisterDropTypes](DragDropRegisterDropTypes.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_)

### FileMaker Magazin

- [Ausgabe 2/2020, Seite 38](https://filemaker-magazin.de/neuigkeit/4089-Appetithappen-FMM_202002)

This function is free to use.

Created 18th August 2014 , last changed 18th December 2020

  
[DragDrop.GetEmailMailbox](DragDropGetEmailMailbox.md) - [DragDrop.GetFileDescriptor](DragDropGetFileDescriptor.md)

[HTML Version](DragDropGetEmailSubject.shtml)