SendMail.GetSource
------------------

Queries the source code for the email.

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

MBS( "SendMail.GetSource"; EmailID ) 

**MBS**( **"SendMail.GetSource"** /\* Queries the source code for the email. \*/  
**$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 text or error.

### Description

Queries the source code for the email.  
Allows you to inspect the email source or save it to an .eml file.  
### See also

- [SendMail.CreateEmail](SendMailCreateEmail.md)
- [SendMail.GetSubject](SendMailGetSubject.md)
- [SendMail.PrepareCURL](SendMailPrepareCURL.md)
- [SendMail.SetSource](SendMailSetSource.md)
- [SendMail.Sign](SendMailSign.md)

### Example Databases

- [CURL/Email/Build and send Email](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/Build%20and%20send%20Email.shtml#1ScriptAnchor_)
- [CURL/Email/Build and send HTML Email with inline graphics](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/Build%20and%20send%20HTML%20Email%20with%20inline%20graphics.shtml#1ScriptAnchor_)

### Blog Entries

- [Sending email with a huge custom function](https://www.mbsplugins.de/archive/2021-06-26/Sending_email_with_a_huge_cust/monkeybreadsoftware_blog_filemaker)
- [Email Script for FileMaker](https://www.mbsplugins.de/archive/2018-10-10/Email_Script_for_FileMaker/monkeybreadsoftware_blog_filemaker)
- [Sending emails in FileMaker with MBS Plugin](https://www.mbsplugins.de/archive/2016-10-03/Sending_emails_in_FileMaker_wi/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 3th September 2014 , last changed 14th July 2025

  
[SendMail.GetSMTPUserName](SendMailGetSMTPUserName.md) - [SendMail.GetSubject](SendMailGetSubject.md)

[HTML Version](SendMailGetSource.shtml)