---
id: object/codeunit/8906
type: object
title: Codeunit 8906 "Email Editor"
summary: Codeunit 8906 "Email Editor" in System Application (System.Email). 26 public procedures. Present since at least BC23, still in BC30, changed in BC24.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: "24"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 99d983af3a47edc713ebdd657eeb5ef2080fee245c9b369916e42ff9561b6c24
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Email/src/Email/Outbox/EmailEditor.Codeunit.al
    title: src/System Application/App/Email/src/Email/Outbox/EmailEditor.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 8906
name: Email Editor
namespace: System.Email
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 29
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 10
  called_by: 3
  implements: 0
---

# Codeunit 8906 "Email Editor"

> Codeunit 8906 "Email Editor" in System Application (System.Email). 26 public procedures. Present since at least BC23, still in BC30, changed in BC24.

System Application · System.Email · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Email/src/Email/Outbox/EmailEditor.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Internal |
| Permissions | tabledata "Email Outbox" = rimd, tabledata "Tenant Media" = r, tabledata "Email Related Record" = rd, tabledata "Email View Policy" = r, tabledata "Email Rate Limit" = r, tabledata "Sent Email" = r |

## Procedures

- `Open(EmailOutbox: Record "Email Outbox"; IsModal: Boolean): Enum "Email Action"`
- `OpenWithScenario(EmailOutbox: Record "Email Outbox"; IsModal: Boolean; Scenario: Enum "Email Scenario"): Enum "Email Action"`
- `CheckPermissions(EmailOutbox: Record "Email Outbox")`
- `SetAsNew()`
- `GetEmailAccount(EmailOutbox: Record "Email Outbox"; var EmailAccount: Record "Email Account")`
- `GetEmailMessage(var EmailOutbox: Record "Email Outbox"; var EmailMessageImpl: Codeunit "Email Message Impl.")`
- `CreateOutbox(var EmailOutbox: Record "Email Outbox")`
- `ChangeEmailAccount(var EmailOutbox: Record "Email Outbox"; var ChosenEmailAccount: Record "Email Account")`
- `UploadAttachment(EmailMessageImpl: Codeunit "Email Message Impl.")`
- `UploadAttachment(EmailMessageImpl: Codeunit "Email Message Impl."; SingleFile: FileUpload)`
- `UploadAttachment(EmailMessageImpl: Codeunit "Email Message Impl."; SingleFile: FileUpload; EncodeType: TextEncoding)`
- `UploadAttachment(EmailMessageImpl: Codeunit "Email Message Impl."; FileName: Text; Instream: InStream)`
- `DownloadAttachment(MediaID: Guid; FileName: Text)`
- `DownloadAttachments(Attachments: Dictionary of [Guid, Text]; FileName: Text)`
- `ValidateEmailData(FromEmailAddress: Text; var EmailMessageImpl: Codeunit "Email Message Impl."): Boolean`
- `SendOutbox(var EmailOutbox: Record "Email Outbox")`
- `DiscardEmail(var EmailOutbox: Record "Email Outbox"; Confirm: Boolean): Boolean`
- `AttachFromRelatedRecords(EmailMessageID: Guid)`
- `LoadWordTemplate(EmailMessageImpl: Codeunit "Email Message Impl."; EmailMessageID: Guid)`
- `AttachFromWordTemplate(EmailMessageImpl: Codeunit "Email Message Impl."; EmailMessageID: Guid)`
- `GetRelatedAttachments(EmailMessageId: Guid; var EmailRelatedAttachmentOut: Record "Email Related Attachment")`
- `LookupRecipients(MessageID: Guid; var Text: Text): Boolean`
- `VerifyRelatedRecords(MessageID: Guid)`
- `RemoveFromCacheIfExists(var TempCache: Dictionary of [Text, Guid]; var EmailMessage: Codeunit "Email Message"; RecipientType: Enum "Email Recipient Type")` (internal)
- `PopulateRelatedRecordCache(MessageID: Guid)` (internal)
- `AddRelatedRecordsFromEmailAddress(MessageID: Guid; var EmailAddressLookupSuggestion: Record "Email Address Lookup")` (internal)

Plus 3 local procedures.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 8905 "Email Message Impl."](../codeunit/8905.md) (13 calls: `AttachFromWordTemplate → AddAttachmentInternal`, `AttachFromWordTemplate → GetContentTypeFromFilename`, `GetEmailMessage → Create`, …)
- [Codeunit 8904 "Email Message"](../codeunit/8904.md) (9 calls: `AddRelatedRecordsFromEmailAddress → Get`, `AddRelatedRecordsFromEmailAddress → GetId`, `BeforeOpenEmailEditor → Get`, …)
- [Codeunit 425 "Data Compression"](../codeunit/425.md) (4 calls: `DownloadAttachments → AddEntry`, `DownloadAttachments → CloseZipArchive`, `DownloadAttachments → CreateZipArchive`, …)
- [Codeunit 8901 "Email"](../codeunit/8901.md) (4 calls: `AddRelatedRecordsFromEmailAddress → AddRelation`, `AddRelatedRecordsFromEmailAddress → HasRelations`, `AttachFromRelatedRecords → OnGetAttachment`, …)
- [Codeunit 4100 "Temp Blob"](../codeunit/4100.md) (2 calls: `DownloadAttachments → CreateInStream`, `DownloadAttachments → CreateOutStream`)
- [Codeunit 8900 "Email Impl"](../codeunit/8900.md) (2 calls: `CheckPermissions → GetUserEmailViewPolicy`, `SendOutbox → Send`)
- [Page extension 8900 "Email Address Lookup"](../pageextension/8900.md) (2 calls: `LookupRecipients → (object)`, `PopulateRelatedRecordCache → (object)`)
- [Codeunit 8711 "Telemetry"](../codeunit/8711.md) (1 call: `BeforeOpenEmailEditor → LogMessage`)
- [Codeunit 8893 "Email Scenario"](../codeunit/8893.md) (1 call: `CreateOutbox → GetDefaultEmailAccount`)
- [Codeunit 8894 "Email Account"](../codeunit/8894.md) (1 call: `GetEmailAccount → GetAllAccounts`)

## Called by

- [Page 13 "Email Editor"](../page/13.md) (10 calls: `LookupRecipients → LookupRecipients`, `OnAfterGetRecord → CheckPermissions`, `OnAfterGetRecord → GetEmailAccount`, …)
- [Codeunit 8900 "Email Impl"](../codeunit/8900.md) (2 calls: `OpenInEditorWithScenario → OpenWithScenario`, `OpenInEditorWithScenario → SetAsNew`)
- [Page 8890 "Email Related Attachments"](../page/8890.md) (1 call: `OnOpenPage → GetRelatedAttachments`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Email Editor")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
