DragDrop.GetEmailMailbox
------------------------

Returns mailbox name 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.GetEmailMailbox"; droparea; Index ) 

**MBS**( **"DragDrop.GetEmailMailbox";** /\* Returns mailbox name 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 mailbox name as text.

### Description

Returns mailbox name of the specified email message.  
Index from 0 to [DragDrop.GetEmailCount](DragDropGetEmailCount.md) -1.  
  
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 mailbox of last email drop:

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

- [DragDrop.GetEmailAccount](DragDropGetEmailAccount.md)
- [DragDrop.GetEmailCount](DragDropGetEmailCount.md)
- [DragDrop.GetEmailSubject](DragDropGetEmailSubject.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.GetEmailID](DragDropGetEmailID.md) - [DragDrop.GetEmailSubject](DragDropGetEmailSubject.md)

[HTML Version](DragDropGetEmailMailbox.shtml)