---
id: object/codeunit/8894
type: object
title: Codeunit 8894 "Email Account"
summary: Codeunit 8894 "Email Account" in System Application (System.Email). 9 public procedures, 2 events. Present since at least BC23, still in BC30, changed in BC27.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: "27"
  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: df6a7584757a1ebdd2be055f2790775461fbbad3d35bd7890e9a0f2daa26de49
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Email/src/Account/EmailAccount.Codeunit.al
    title: src/System Application/App/Email/src/Account/EmailAccount.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: 8894
name: Email Account
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:
  - "27"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 11
  events: 2
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 26
  implements: 0
---

# Codeunit 8894 "Email Account"

> Codeunit 8894 "Email Account" in System Application (System.Email). 9 public procedures, 2 events. Present since at least BC23, still in BC30, changed in BC27.

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

## Properties

| Property | Value |
|---|---|
| Access | Public |

## Events published

- `OnAfterValidateEmailAddress(EmailAddress: Text; AllowEmptyValue: Boolean)` (integration)
- `OnAfterDeleteEmailAccount(EmailAccountId: GUID; EmailAccountConnector: enum "Email Connector")` (integration)

## Procedures

- `GetAllAccounts(LoadLogos: Boolean; var TempEmailAccount: Record "Email Account" temporary)`: Gets all of the email accounts registered in Business Central.
- `GetAllAccounts(var TempEmailAccount: Record "Email Account" temporary)`: Gets all of the email accounts registered in Business Central.
- `IsAnyAccountRegistered(): Boolean`: Checks if there is at least one email account registered in Business Central.
- `IsAccountRegistered(EmailAccountId: Guid; EmailConnector: Enum "Email Connector"): Boolean`: Checks if a specific email account is registered in Business Central.
- `DeleteAccounts(var TempEmailAccountsToDelete: Record "Email Account" temporary; HideDialog: Boolean)`: Deletes all selected email accounts.
- `ValidateEmailAddress(EmailAddress: Text)`: Validates an email address and throws an error if it is invalid.
- `ValidateEmailAddress(EmailAddress: Text; AllowEmptyValue: Boolean)`: Validates an email address and throws an error if it is invalid.
- `ValidateEmailAddresses(EmailAddresses: Text)`: Validates email addresses and displays an error if any are invalid.
- `ValidateEmailAddresses(EmailAddresses: Text; AllowEmptyValue: Boolean)`: Validates email addresses and displays an error if any are invalid.

## 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 8889 "Email Account Impl."](../codeunit/8889.md) (6 calls: `DeleteAccounts → DeleteAccounts`, `GetAllAccounts → GetAllAccounts`, `IsAccountRegistered → IsAccountRegistered`, …)

## Called by

- [Codeunit 8892 "Email Scenario Impl."](../codeunit/8892.md) (3 calls: `ChangeAccount → GetAllAccounts`, `GetEmailAccount → GetAllAccounts`, `GetScenariosByEmailAccount → GetAllAccounts`)
- [Codeunit 1814 "Assisted Setup Subscribers"](../codeunit/1814.md) (2 calls: `EmailAccountIsSetup → IsAnyAccountRegistered`, `UpdateSetUpEmail → IsAnyAccountRegistered`)
- [Codeunit 4400 "SOA Setup"](../codeunit/4400.md) (2 calls: `GetDefaultEmailAccount → GetAllAccounts`, `GetEmailAccount → GetAllAccounts`)
- [Codeunit 4509 "Email - Outlook API Helper"](../codeunit/4509.md) (2 calls: `EmailOutlookAccountAddressValidation → ValidateEmailAddress`, `GetEmailAddressFromEmailAccounts → GetAllAccounts`)
- [Codeunit 6938 "EA Agent Dispatcher"](../codeunit/6938.md) (2 calls: `ExtractAndValidateRecipients → ValidateEmailAddress`, `SendEmail → IsAccountRegistered`)
- [Codeunit 8800 "Custom Layout Reporting"](../codeunit/8800.md) (2 calls: `CheckEmailSendTo → ValidateEmailAddresses`, `GetRequestParameters → IsAnyAccountRegistered`)
- [Codeunit 9520 "Mail Management"](../codeunit/9520.md) (2 calls: `CheckValidEmailAddress → ValidateEmailAddress`, `IsEnabled → IsAnyAccountRegistered`)
- [Page 6991 "Expense Agent Setup Wizard"](../page/6991.md) (2 calls: `ValidateNoreplyMailboxExists → GetAllAccounts`, `ValidateSelectedMailboxExists → GetAllAccounts`)
- [Codeunit 1368 "Monitored Field Notification"](../codeunit/1368.md) (1 call: `IsMonitorReadyToSendEmails → IsAccountRegistered`)
- [Codeunit 2135 "O365 Setup Email"](../codeunit/2135.md) (1 call: `CheckMailSetup → IsAnyAccountRegistered`)
- [Codeunit 3304 "PA Setup Configuration"](../codeunit/3304.md) (1 call: `GetEmailAccount → GetAllAccounts`)
- [Codeunit 4419 "SOA Send Reply"](../codeunit/4419.md) (1 call: `GetMappedReplyRecipients → GetAllAccounts`)
- [Codeunit 4614 "SMTP Message Impl"](../codeunit/4614.md) (1 call: `TryParseInternetAddressList → ValidateEmailAddress`)
- [Codeunit 6755 "Send Reminder Action"](../codeunit/6755.md) (1 call: `ValidateSetup → GetAllAccounts`)
- [Codeunit 8889 "Email Account Impl."](../codeunit/8889.md) (1 call: `ValidateEmailAddress → OnAfterValidateEmailAddress`)
- [Codeunit 8895 "Email Feature"](../codeunit/8895.md) (1 call: `AddEmailAccountsToServiceConnections → IsAnyAccountRegistered`)
- [Codeunit 8900 "Email Impl"](../codeunit/8900.md) (1 call: `GetEmailAccount → GetAllAccounts`)
- [Codeunit 8905 "Email Message Impl."](../codeunit/8905.md) (1 call: `ValidateRecipients → ValidateEmailAddress`)
- [Codeunit 8906 "Email Editor"](../codeunit/8906.md) (1 call: `GetEmailAccount → GetAllAccounts`)
- [Codeunit 8907 "Email Viewer"](../codeunit/8907.md) (1 call: `GetEmailAccount → GetAllAccounts`)
- [Page 1007 "Job Planning Lines"](../page/1007.md) (1 call: `OnInit → IsAnyAccountRegistered`)
- [Page 1015 "Job Planning Lines Part"](../page/1015.md) (1 call: `OnInit → IsAnyAccountRegistered`)
- [Page 1368 "Monitor Field Setup Wizard"](../page/1368.md) (1 call: `OnOpenPage → IsAnyAccountRegistered`)
- [Page 4400 "SOA Setup"](../page/4400.md) (1 call: `CheckMailboxExists → GetAllAccounts`)
- [Page 8887 "Email Accounts"](../page/8887.md) (1 call: `UpdateEmailAccounts → GetAllAccounts`)
- [Table 6930 "Expense Agent Setup"](../table/6930.md) (1 call: `CheckMailboxExists → GetAllAccounts`)

## Across versions

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

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 Account")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
