CURL.SetOptionMailFrom
----------------------

Sets the mail sender.

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

MBS( "CURL.SetOptionMailFrom"; curl; Value { ; Encoding } ) 

**MBS**( **"CURL.SetOptionMailFrom";** /\* Sets the mail sender. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**; /\* The from address.e.g. "someone@macsw.de" \*/   
**$Encoding**) /\* Optional; The text encoding for text parameter.   
Default is UTF-8.e.g. "UTF8" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| curl | The CURL session handle. | $curl |  |
| Value | The from address. | "someone@macsw.de" |  |
| Encoding | The text encoding for text parameter.    Default is UTF-8.   Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the [FAQ](https://www.monkeybreadsoftware.com/filemaker/faq.shtml). | "UTF8" | Optional |

### Result

Returns "OK" on success.

### Description

Sets the mail sender.  
It will be used to specify the sender address in a mail when sending an SMTP mail with libcurl.  
  
An originator email address in SMTP lingo is specified within angle brackets (&lt;&gt;) which libcurl will not add for you before version 7.21.4. Failing to provide such brackets may cause the server to reject your mail.  
See also [MAIL\_FROM](https://curl.haxx.se/libcurl/c/CURLOPT_MAIL_FROM.html) option in CURL manual.

### See also

- [CURL.SetOptionFailOnError](CURLSetOptionFailOnError.md)
- [CURL.SetOptionFileTime](CURLSetOptionFileTime.md)
- [CURL.SetOptionMailAuth](CURLSetOptionMailAuth.md)
- [CURL.SetOptionPassword](CURLSetOptionPassword.md)
- [CURL.SetOptionResumeFrom](CURLSetOptionResumeFrom.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)
- [MBS Filemaker Plugin, version 2.6pr7](https://www.mbsplugins.de/archive/2012-03-16/MBS_Filemaker_Plugin_version_2/monkeybreadsoftware_blog_filemaker)

Created 18th August 2014 , last changed 5th July 2015

  
[CURL.SetOptionMailAuth](CURLSetOptionMailAuth.md) - [CURL.SetOptionMailRecipients](CURLSetOptionMailRecipients.md)

[HTML Version](CURLSetOptionMailFrom.shtml)