---
id: object/codeunit/4513
type: object
title: Codeunit 4513 "SMTP Connector Impl."
summary: Codeunit 4513 "SMTP Connector Impl." in Email - SMTP Connector (System.Email). 18 public procedures, 2 event subscribers. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - email - smtp connector
versions:
  introduced: "29"
  last_changed: null
  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: 7588332a8c7e8fe7d892ba1cd65783592f0b5c0ebfead6f105e33da3b0f54c04
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Email%20-%20SMTP%20Connector/app/src/SMTPConnectorImpl.Codeunit.al
    title: src/Apps/W1/Email - SMTP Connector/app/src/SMTPConnectorImpl.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/9637
object_type: codeunit
object_id: 4513
name: SMTP Connector Impl.
namespace: System.Email
app: Email - SMTP Connector
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 27
  events: 0
  subscribers: 2
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 6
  called_by: 6
  implements: 1
---

# Codeunit 4513 "SMTP Connector Impl."

> Codeunit 4513 "SMTP Connector Impl." in Email - SMTP Connector (System.Email). 18 public procedures, 2 event subscribers. Introduced in BC29, still in BC30.

Email - SMTP Connector · System.Email · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Email%20-%20SMTP%20Connector/app/src/SMTPConnectorImpl.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Internal |
| Permissions | tabledata "SMTP Account" = rimd |

## Event subscriptions

- SetTestEmailBody subscribes to Codeunit "Email" OnGetBodyForTestEmail
- ClearCompanyConfigGeneral subscribes to Codeunit "Environment Cleanup" OnClearCompanyConfig

## Procedures

- `GetAccounts(var Accounts: Record "Email Account")`: Gets the registered accounts for the SMTP connector.
- `ShowAccountInformation(AccountId: Guid)`: Shows accounts information.
- `RegisterAccount(var Account: Record "Email Account"): Boolean`: Register an e-mail account for the SMTP connector.
- `DeleteAccount(AccountId: Guid): Boolean`: Deletes an e-mail account for the SMTP connector.
- `Send(Message: Codeunit "Email Message"; AccountId: Guid)`: Sends an e-mail via the SMTP connector.
- `GetDescription(): Text[250]`: Gets a description of the SMTP connector.
- `GetLogoAsBase64(): Text`: Gets the SMTP connector logo.
- `Initialize(Account: Record "SMTP Account")`: Initializes variables for creating an SMTP email.
- `ApplyOffice365Smtp(var SMTPAccountConfig: Record "SMTP Account")`
- `SMTPBasicOAuthIsUsed(): Boolean` (internal)
- `SendSMTPBasicOAuthObsoletionNotification()` (internal)
- `LearnMoreAboutSMTPBasicAuthObsoletion(Notification: Notification)` (internal)
- `GetSmtpErrorCodeFromResponse(ErrorResponse: Text): Text`
- `IsAccountValid(SMTPAccountRec: Record "SMTP Account" temporary): Boolean` (internal)
- `CreateAccount(var SMTPAccountToCopy: Record "SMTP Account"; Password: Text; var EmailAccount: Record "Email Account")` (internal)
- `GetO365SmtpServer(): Text` (internal)
- `CheckIfCustomizedSMTPOAuth(AccoutId: Guid; var SMTPAccounts: Record "SMTP Account"): Boolean` (internal)
- `ObsfuscateEmailAddress(Email: Text): Text` (internal)

Plus 7 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 8904 "Email Message"](../codeunit/8904.md) (9 calls: `BuildSMTPMessage → Attachments_First`, `BuildSMTPMessage → Attachments_GetContent`, `BuildSMTPMessage → Attachments_GetName`, …)
- [Codeunit 4613 "SMTP Message"](../codeunit/4613.md) (7 calls: `BuildSMTPMessage → AddAttachment`, `BuildSMTPMessage → AddFrom`, `BuildSMTPMessage → SetBCCRecipients`, …)
- [Codeunit 4611 "SMTP Client"](../codeunit/4611.md) (4 calls: `Send → Authenticate`, `Send → Connect`, `Send → Disconnect`, …)
- [Codeunit 4620 "SMTP Authentication"](../codeunit/4620.md) (2 calls: `Send → SetBasicAuthInfo`, `Send → SetServer`)
- [Codeunit 3960 "Regex"](../codeunit/3960.md) (1 call: `GetSmtpErrorCodeFromResponse → IsMatch`)
- [Page 4512 "SMTP Account"](../page/4512.md) (1 call: `ShowAccountInformation → (object)`)

## Called by

- [Codeunit 4516 "OAuth2 SMTP Authentication"](../codeunit/4516.md) (2 calls: `OnSMTPOAuth2Authenticate → CheckIfCustomizedSMTPOAuth`, `OnSMTPOAuth2Authenticate → GetO365SmtpServer`)
- [Page 4511 "SMTP Account Wizard"](../page/4511.md) (2 calls: `EnsureAccountCreated → CreateAccount`, `SetProperties → GetO365SmtpServer`)
- [Page extension 4511 "SMTP EMailOutbox"](../pageextension/4511.md) (2 calls: `OnOpenPage → SendSMTPBasicOAuthObsoletionNotification`, `OnOpenPage → SMTPBasicOAuthIsUsed`)
- [Page extension 4512 "SMTP Sent Email"](../pageextension/4512.md) (2 calls: `OnOpenPage → SendSMTPBasicOAuthObsoletionNotification`, `OnOpenPage → SMTPBasicOAuthIsUsed`)
- [Page extension 4513 "SMTP Email Accounts Ext."](../pageextension/4513.md) (2 calls: `OnOpenPage → SendSMTPBasicOAuthObsoletionNotification`, `OnOpenPage → SMTPBasicOAuthIsUsed`)
- [Page 4512 "SMTP Account"](../page/4512.md) (1 call: `SetProperties → GetO365SmtpServer`)

## Implements

- [Interface "Email Connector"](../interface/email-connector.md)

## Recent changes

- 2026-07-24 [#9637 [Event Requests] Add integration events across base app and SMTP module](../../changes/bcapps/9637.md) (main, BC30, feature)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

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