CURL.SetOptionMailRecipients
----------------------------

Sets the recipients list.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [2.5](newinversion25.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.SetOptionMailRecipients"; curl; Value... ) 

**MBS**( **"CURL.SetOptionMailRecipients";** /\* Sets the recipients list. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value...**) /\* First email address.e.g. "someone@macsw.de" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value... | First email address. | "someone@macsw.de" |

### Result

Returns "OK" on success.

### Description

Sets the recipients list.  
Pass a list of recipients to pass to the server in your SMTP mail request. For passing several recipients, simply add more parameters to the function call.  
  
Each recipient in SMTP lingo is specified with angle brackets (&lt;&gt;), but should you not use an angle bracket as first letter libcurl will assume you provide a single email address only and enclose that with angle brackets for you.  
  
This option takes a list of items. So this function takes a variable number of arguments. If you call function with 2 parameters, you set an empty list. If you call it with 5 parameters, you set a list with 3 values.  
  
This function takes variable number of parameters. Pass as much parameters as needed separated by the semicolon in FileMaker.  
Please repeat Value parameter as often as you need.  
See also [MAIL\_RCPT](https://curl.haxx.se/libcurl/c/CURLOPT_MAIL_RCPT.html) option in CURL manual.

### Examples

Set three recipients:

 MBS ( "CURL.SetOptionMailRecipients"; $curl ; $email1 ; $email2 ; $email3 )  
### See also

- [CURL.GetOptionMailRecipients](CURLGetOptionMailRecipients.md)
- [CURL.SetOptionMailAuth](CURLSetOptionMailAuth.md)

### Blog Entries

- [Translating Insert from URL options for CURL to MBS Plugin calls](https://www.mbsplugins.de/archive/2020-12-14/Translating_Insert_from_URL_op/monkeybreadsoftware_blog_filemaker)

Created 18th August 2014 , last changed 5th June 2021

  
[CURL.SetOptionMailFrom](CURLSetOptionMailFrom.md) - [CURL.SetOptionMaxAgeConn](CURLSetOptionMaxAgeConn.md)

[HTML Version](CURLSetOptionMailRecipients.shtml)