Component: WinSendMail 
-----------------------

Send emails via mail client on Windows via MAPI.

This can use Outlook or Thunderbird on Windows to send email with or without GUI.   
Using Messaging Application Programming Interface (MAPI)  
  
See [SendMail](component_SendMail.md) functions to send via CURL and SMTP server.  
  
Does not work with Micorosft Outlook Web App as we need a locally installed Outlook with a MAPI component. Since Outlook for Windows is a web app wrapped in a desktop app, it doesn't do MAPI.

| Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|
| [7.1](newinversion71.md "First functions introduced with version 7.1.") / [10.5](newinversion105.md "Newest functions in version 10.5.") | ❌ No | ✅ Yes | ❌ No | ❌ No | ❌ No |

  
| Item | Details |
|:--|:--|
| [WinSendMail.AddAttachmentContainer](WinSendMailAddAttachmentContainer.md)   Adds an attachment to the email based on a container field. | Win only   7.1 |
| [WinSendMail.AddAttachmentFile](WinSendMailAddAttachmentFile.md)   Adds an attachment to the email based on a file path. | Win only   7.1 |
| [WinSendMail.AddAttachmentText](WinSendMailAddAttachmentText.md)   Adds an attachment to the email based on a text. | Win only   7.1 |
| [WinSendMail.AddBCC](WinSendMailAddBCC.md)   Adds a blind copy recipient. | Win only   7.1 |
| [WinSendMail.AddCC](WinSendMailAddCC.md)   Adds a copy recipient. | Win only   7.1 |
| [WinSendMail.AddRecipient](WinSendMailAddRecipient.md)   Adds a recipient. | Win only   7.1 |
| [WinSendMail.AddTo](WinSendMailAddTo.md)   Adds a recipient. | Win only   7.1 |
| [WinSendMail.AttachmentCount](WinSendMailAttachmentCount.md)   Queries number of attachments. | Win only   7.1 |
| [WinSendMail.ClearAttachments](WinSendMailClearAttachments.md)   Clears all attachments from this email. | Win only   7.1 |
| [WinSendMail.ClearRecipients](WinSendMailClearRecipients.md)   Clears all recipients. | Win only   7.1 |
| [WinSendMail.CreateEmail](WinSendMailCreateEmail.md)   Creates a new email. | Win only   7.1 |
| [WinSendMail.GetSubject](WinSendMailGetSubject.md)   Queries the subject of this email. | Win only   7.1 |
| [WinSendMail.GetText](WinSendMailGetText.md)   Queries text to send. | Win only   7.1 |
| [WinSendMail.Release](WinSendMailRelease.md)   Releases all memory used by this email. | Win only   7.1 |
| [WinSendMail.ReleaseAll](WinSendMailReleaseAll.md)   Release all send email sessions. | Win only   10.5 |
| [WinSendMail.Send](WinSendMailSend.md)   Sends email. | Win only   7.1 |
| [WinSendMail.SendAnsi](WinSendMailSendAnsi.md)  **Deprecated**    Sends email. | Win only   7.1 |
| [WinSendMail.SendAsync](WinSendMailSendAsync.md)   Sends email asynchronously. | Win only   9.1 |
| [WinSendMail.SetFrom](WinSendMailSetFrom.md)   Sets the email from address. | Win only   7.1 |
| [WinSendMail.SetSubject](WinSendMailSetSubject.md)   Sets the subject line. | Win only   7.1 |
| [WinSendMail.SetText](WinSendMailSetText.md)   Sets the text content. | Win only   7.1 |

21 functions shown.

These functions require a license (81%).

### Release notes

- **Version 12.0**
    - Fixed a problem with [WinSendMail.AddBCC](https://www.mbsplugins.eu/WinSendMailAddBCC.shtml), [WinSendMail.AddCC](https://www.mbsplugins.eu/WinSendMailAddCC.shtml), [WinSendMail.AddRecipient](https://www.mbsplugins.eu/WinSendMailAddRecipient.shtml), [WinSendMail.AddTo](https://www.mbsplugins.eu/WinSendMailAddTo.shtml) not passing email when name is empty.
- **Version 10.5**
    - Added [AVExport.ReleaseAll](https://www.mbsplugins.eu/AVExportReleaseAll.shtml), [AVRecorder.ReleaseAll](https://www.mbsplugins.eu/AVRecorderReleaseAll.shtml), [CoreML.ReleaseAll](https://www.mbsplugins.eu/CoreMLReleaseAll.shtml), [DNSLookup.ReleaseAll](https://www.mbsplugins.eu/DNSLookupReleaseAll.shtml), [Dictionary.ReleaseAll](https://www.mbsplugins.eu/DictionaryReleaseAll.shtml), [FM.SQL.ReleaseAll](https://www.mbsplugins.eu/FMSQLReleaseAll.shtml), [JS.ReleaseAll](https://www.mbsplugins.eu/JSReleaseAll.shtml), [JavaScript.ReleaseAll](https://www.mbsplugins.eu/JavaScriptReleaseAll.shtml), [LDAP.ReleaseAll](https://www.mbsplugins.eu/LDAPReleaseAll.shtml), [PDFKit.ReleaseAll](https://www.mbsplugins.eu/PDFKitReleaseAll.shtml), [PKCS12.ReleaseAll](https://www.mbsplugins.eu/PKCS12ReleaseAll.shtml), [PKCS7.ReleaseAll](https://www.mbsplugins.eu/PKCS7ReleaseAll.shtml), [PKey.ReleaseAll](https://www.mbsplugins.eu/PKeyReleaseAll.shtml), [SSH.ReleaseAll](https://www.mbsplugins.eu/SSHReleaseAll.shtml), [WinSendMail.ReleaseAll](https://www.mbsplugins.eu/WinSendMailReleaseAll.shtml), [WindowsML.ReleaseAll](https://www.mbsplugins.eu/WindowsMLReleaseAll.shtml), [WordFile.ReleaseAll](https://www.mbsplugins.eu/WordFileReleaseAll.shtml), and [X509.ReleaseAll](https://www.mbsplugins.eu/X509ReleaseAll.shtml).
- **Version 9.1**
    - Added [WinSendMail.SendAsync](http://www.mbsplugins.eu/WinSendMailSendAsync.shtml) function.
- **Version 8.3**
    - Fixed problem with [WinSendMail.Send](http://www.mbsplugins.eu/WinSendMailSend.shtml) for one user.

### Blog Entries

- [5000 Functions in MBS Plugin](https://www.mbsplugins.de/archive/2017-11-11/5000_Functions_in_MBS_Plugin/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 7.2](https://www.mbsplugins.de/archive/2017-05-15/MBS_FileMaker_Plugin_72/monkeybreadsoftware_blog_filemaker)
- [Send emails via Outlook](https://www.mbsplugins.de/archive/2017-04-18/Send_emails_via_Outlook/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 6/2020, Seite 25](https://filemaker-magazin.de/neuigkeit/4118-Appetithappen-FMM_202006)

### Example Databases

- [Win Only/Send Email via Email Application](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Win%20Only/Send%20Email%20via%20Email%20Application.shtml#1ScriptAnchor_)

[HTML Version](component_WinSendMail.shtml)