---
title: "Codeunit 8905 Email Message Impl."
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/8905-email-message-impl/
type: codeunit
id: 8905
name: "Email Message Impl."
app: "System Application"
namespace: System.Email
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/8905-email-message-impl/source/24/ https://jonas-paprotka.de/ref/codeunit/8905-email-message-impl/source/25/ https://jonas-paprotka.de/ref/codeunit/8905-email-message-impl/source/26/ https://jonas-paprotka.de/ref/codeunit/8905-email-message-impl/source/27/ https://jonas-paprotka.de/ref/codeunit/8905-email-message-impl/source/28/ https://jonas-paprotka.de/ref/codeunit/8905-email-message-impl/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 8905 Email Message Impl.

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/8905-email-message-impl/

| | |
| --- | --- |
| App | System Application |
| Namespace | System.Email |
| Versions | 17-28 |
| Source file | Email/src/Message/EmailMessageImpl.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| Create | (Codeunit Email Message Impl.) | - | public | 17-28 | - | - |
| Create | (Text, Text, Text, Boolean) | - | public | 17-28 | - | - |
| Create | (List, Text, Text, Boolean) | - | public | 17-24 | - | - |
| Create | (List, Text, Text, Boolean, List, List) | - | public | 17-24 | - | - |
| UpdateMessage | (List, Text, Text, Boolean, List, List) | - | public | 17-24 | - | - |
| Modify | () | - | public | 17-28 | - | - |
| GetBody | () | Text | public | 17-28 | - | - |
| SetBody | (Text) | - | public | 17-28 | - | - |
| GetSubject | () | Text[2048] | public | 17-28 | - | - |
| SetSubject | (Text) | - | public | 17-28 | - | - |
| IsBodyHTMLFormatted | () | Boolean | public | 17-28 | - | - |
| SetBodyHTMLFormatted | (Boolean) | - | public | 17-28 | - | - |
| IsReadOnly | () | Boolean | public | 17 | - | - |
| GetContentTypeFromFilename | (Text) | Text[250] | public | 17-28 | - | - |
| AddAttachment | (Text[250], Text[250], Text) | - | public | 17-28 | - | - |
| AddAttachment | (Text[250], Text[250], InStream) | - | public | 17-28 | - | - |
| AddAttachmentInternal | (Text[250], Text[250], InStream) | Integer | public | 17-28 | - | - |
| GetRecipients | (Enum Email Recipient Type, var List) | - | public | 17 | - | - |
| GetRecipientsAsText | (Enum Email Recipient Type) | Text | public | 17-28 | - | - |
| SetRecipients | (Enum Email Recipient Type, Text) | - | public | 17-28 | - | - |
| SetRecipients | (Enum Email Recipient Type, List) | - | public | 17-28 | - | - |
| Attachments_First | () | Boolean | public | 17-28 | - | - |
| Attachments_Next | () | Integer | public | 17-28 | - | - |
| Attachments_GetName | () | Text[250] | public | 17-28 | - | - |
| Attachments_GetContent | (var InStream) | - | public | 17-28 | - | - |
| Attachments_GetContentBase64 | () | Text | public | 17-28 | - | - |
| Attachments_GetContentType | () | Text[250] | public | 17-28 | - | - |
| Attachments_GetContentId | () | Text[40] | public | 17-28 | - | - |
| Attachments_IsInline | () | Boolean | public | 17-28 | - | - |
| Attachments_GetLength | () | Integer | public | 17-28 | - | - |
| GetId | () | Guid | public | 17-28 | - | - |
| Get | (Guid) | Boolean | public | 17-28 | - | - |
| ValidateRecipients | (Enum Email Recipient Type) | - | public | 17 | - | - |
| ValidateRecipients | (List, Enum Email Recipient Type) | - | public | 17 | - | - |
| MarkAsReadOnly | () | - | public | 17 | - | - |
| GetEmailMessage | (var Record Email Message) | - | public | 17-28 | - | - |
| IsRead | () | Boolean | public | 18-28 | - | - |
| GetRecipients | () | List | public | 18-28 | - | - |
| GetRecipients | (Enum Email Recipient Type) | List | public | 18-28 | - | - |
| ValidateRecipients | () | - | public | 18-28 | - | - |
| MarkAsRead | () | - | public | 18-28 | - | - |
| Attachments_DeleteContent | () | Boolean | public | 19-28 | - | - |
| AppendToBody | (Text) | - | public | 20-28 | - | - |
| AddRecipient | (Enum Email Recipient Type, Text) | - | public | 20-28 | - | - |
| GetNoOfModifies | () | Integer | public | 20-28 | - | - |
| AddAttachment | (Text[250], Text[250], InStream, Boolean, Text[40]) | - | public | 21-28 | - | - |
| AddAttachmentInternal | (Text[250], Text[250], InStream, Boolean, Text[40]) | Integer | public | 21-28 | - | - |
| AddAttachmentsFromScenario | (var Record Email Attachments) | - | public | 21-28 | - | - |
| GetRelatedAttachments | (var Record Email Related Attachment) | Boolean | public | 21-28 | - | - |
| GetRelatedAttachments | (Guid, var Record Email Related Attachment) | Boolean | public | 21-28 | - | - |
| FormatFileSize | (Integer) | Text | internal | 22-28 | - | - |
| Attachments_DeleteContent | (Boolean) | Boolean | public | 23-28 | - | - |
| Attachments_Delete | () | Boolean | public | 23-28 | - | - |
| Attachments_Delete | (Boolean) | Boolean | public | 23-28 | - | - |
| DeleteOrphanedMessages | (Guid, Integer) | Guid | public | 24-28 | - | - |
| Create | (Text, Text, Text, Boolean, Boolean) | - | public | 25-28 | - | - |
| Create | (List, Text, Text, Boolean, List, List, Boolean) | - | public | 25-28 | - | - |
| CreateReply | (Text, Text, Text, Boolean, Text) | - | public | 25-28 | - | - |
| CreateReply | (List, Text, Text, Boolean, Text, List, List) | - | public | 25-28 | - | - |
| CreateReplyAll | (Text, Text, Boolean, Text) | - | public | 25-28 | - | - |
| UpdateMessage | (List, Text, Text, Boolean, Text, List, List, Boolean) | - | public | 25-28 | - | - |
| GetExternalId | () | Text[2048] | public | 25-28 | - | - |
| Attachments_GetId | () | BigInteger | public | 26-28 | - | - |
| DeleteEmailRecipientsIfOrphaned | (Guid, Integer) | Guid | public | 27-28 | - | - |
| AddHeader | (Text, Text) | - | public | 28 | - | - |
| SetHeader | (Text, Text) | - | public | 28 | - | - |
| GetHeader | (Text, var Text) | Boolean | public | 28 | - | - |
| FlushHeaders | () | - | public | 28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Internal event | OnBeforeDeleteSentEmailAttachment | (var Boolean) | 23-28 | - | - |

## Source

Symbols: Microsoft.SystemApplication.symbols.63ca2fa4-4f03-4f2b-a480-172fef340d3f, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 24: https://github.com/microsoft/BCApps, MIT, releases/24.x at fe14d3e6db00d28df3a69c7bba830813d70794e2.
AL source 25: https://github.com/microsoft/BCApps, MIT, releases/25.x at 68d52c129129c83b2e396a473aaa5b2ce61d2eed.
AL source 26: https://github.com/microsoft/BCApps, MIT, releases/26.x at 78c4acf0d64a8eee157ea80164fa8fc2acffc9eb.
AL source 27: https://github.com/microsoft/BCApps, MIT, releases/27.x at 1749020b4c9445a43e4f7f540e89b7fa76ec25fd.
AL source 28: https://github.com/microsoft/BCApps, MIT, releases/28.x at 740f59156b249f8ed7cba2e28423f03ae7b07233.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
