SendMail.ClearRecipients
------------------------

Clears all recipients.

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

MBS( "SendMail.ClearRecipients"; EmailID ) 

**MBS**( **"SendMail.ClearRecipients";** /\* Clears all recipients. \*/  
**$EmailID**) /\* The email reference number obtained using [SendMail.CreateEmail](SendMailCreateEmail.md) function. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| EmailID | The email reference number obtained using [SendMail.CreateEmail](SendMailCreateEmail.md) function. | $EmailID |

### Result

Returns OK or error.

### Description

Clears all recipients.  
Removes all TO, CC, BCC and ReplyTO entries.  
### Examples

Clear recipients from email:

 MBS ( "SendMail.ClearRecipients"; $EmailID )  
### See also

- [SendMail.AddRecipient](SendMailAddRecipient.md)
- [SendMail.ClearAttachments](SendMailClearAttachments.md)
- [SendMail.CreateEmail](SendMailCreateEmail.md)
- [WinSendMail.ClearRecipients](WinSendMailClearRecipients.md)

### Example Databases

- [CURL/Email/Batch Emailer](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/Batch%20Emailer.shtml#1ScriptAnchor_)

This function checks for a license.

Created 5th September 2014 , last changed 19th February 2016

  
[SendMail.ClearHeaders](SendMailClearHeaders.md) - [SendMail.CreateEmail](SendMailCreateEmail.md)

[HTML Version](SendMailClearRecipients.shtml)