---
id: object/codeunit/260
type: object
title: Codeunit 260 "Document-Mailing"
summary: Codeunit 260 "Document-Mailing" in Base Application (System.EMail). 32 public procedures, 12 events. Present since at least BC23, still in BC30, changed in BC24-25, BC27.
tier: official
language: en
tags:
  - codeunit
  - base 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: cee6adf2f0d82879b79eae78b175bfab322bae7a803ce12fd4d95e85bf78d58d
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/DocumentMailing.Codeunit.al
    title: src/Layers/W1/BaseApp/DocumentMailing.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: 260
name: Document-Mailing
namespace: System.EMail
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "27"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 48
  events: 12
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 6
  calls: 4
  called_by: 53
  implements: 0
---

# Codeunit 260 "Document-Mailing"

> Codeunit 260 "Document-Mailing" in Base Application (System.EMail). 32 public procedures, 12 events. Present since at least BC23, still in BC30, changed in BC24-25, BC27.

Base Application · System.EMail · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/DocumentMailing.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| TableNo | Job Queue Entry |

## Events published

- `OnBeforeSendEmail(var TempEmailItem: Record "Email Item" temporary; var IsFromPostedDoc: Boolean; var PostedDocNo: Code[20]; var HideDialog: Boolean; var ReportUsage: Integer; var EmailSentSuccesfully: Boolean; var IsHandled: Boolean; EmailDocName: Text[250]; SenderUserID: Code[50]; EmailScenario: Enum "Email Scenario")` (integration)
  - subscribers: [Codeunit 6753 "Send Reminder Event Handler"](../codeunit/6753.md) DeleteFailedEmailsBeforeSendingEmail
- `OnAfterEmailSentSuccesfully(var TempEmailItem: Record "Email Item" temporary; PostedDocNo: Code[20]; ReportUsage: Integer)` (integration)
- `OnAfterEmailSent(var TempEmailItem: Record "Email Item" temporary; PostedDocNo: Code[20]; ReportUsage: Integer; EmailSentSuccesfully: Boolean)` (integration)
  - subscribers: [Codeunit 545 "Send Reminder"](../codeunit/545.md) HandleEmailSent, [Codeunit 6753 "Send Reminder Event Handler"](../codeunit/6753.md) UpdateStatusAfterEmailSent
- `OnBeforeEmailFileInternal(var TempEmailItem: Record "Email Item" temporary; var HtmlBodyFilePath: Text[250]; var EmailSubject: Text[250]; var ToEmailAddress: Text[250]; var PostedDocNo: Code[20]; var EmailDocName: Text[250]; var HideDialog: Boolean; var ReportUsage: Integer; var IsFromPostedDoc: Boolean; var SenderUserID: Code[50]; var EmailScenario: Enum "Email Scenario"; var EmailSentSuccessfully: Boolean; var IsHandled: Boolean)` (integration, obsolete 27.0)
- `OnBeforeEmailItemPreparation(var TempEmailItem: Record "Email Item" temporary; var HtmlBody: Codeunit "Temp Blob"; var EmailSubject: Text[250]; var ToEmailAddress: Text[250]; var PostedDocNo: Code[20]; var EmailDocName: Text[250]; var HideDialog: Boolean; var ReportUsage: Integer; var IsFromPostedDoc: Boolean; var SenderUserID: Code[50]; var EmailScenario: Enum "Email Scenario"; var EmailSentSuccessfully: Boolean; var IsHandled: Boolean)` (integration)
  - subscribers: [Codeunit 6753 "Send Reminder Event Handler"](../codeunit/6753.md) AttachRelatedDocumentsBeforeEmailFileInternal
- `OnBeforeEmailFile(var HideDialog: Boolean)` (integration)
- `OnBeforeGetAttachmentFileName(var AttachmentFileName: Text[250]; PostedDocNo: Code[20]; EmailDocumentName: Text[250]; ReportUsage: Integer)` (integration)
  - subscribers: [Codeunit 1890 "Reminder Communication"](../codeunit/1890.md) OnBeforeGetAttachmentFileName
- `OnBeforeGetEmailSubject(PostedDocNo: Code[20]; EmailDocumentName: Text[250]; ReportUsage: Integer; var EmailSubject: Text[250]; var IsHandled: Boolean)` (integration)
  - subscribers: [Codeunit 1890 "Reminder Communication"](../codeunit/1890.md) OnBeforeGetEmailSubject
- `OnBeforeGetToAddressFromCustomer(BillToCustomerNo: Code[20]; var ToAddress: Text[250]; var IsHandled: Boolean)` (integration)
- `OnBeforeGetToAddressFromVendor(BuyFromVendorNo: Code[20]; var ToAddress: Text[250]; var IsHandled: Boolean)` (integration)
- `OnAfterGetEmailSubject(PostedDocNo: Code[20]; EmailDocumentName: Text[250]; ReportUsage: Integer; var EmailSubject: Text[250])` (integration)
- `OnAfterGetAttachmentFileName(var AttachmentFileName: Text[250]; PostedDocNo: Code[20]; EmailDocumentName: Text[250]; ReportUsage: Integer)` (integration)

## Procedures

- `EnqueueEmailFile(AttachmentInStream: Instream; AttachmentName: Text; PostedDocNo: Code[20]; ToEmailAddress: Text[250]; EmailDocName: Text[250]; HideDialog: Boolean; ReportUsage: Integer; SourceTables: List of [Integer]; SourceIDs: List of [Guid]; SourceRelationTypes: List of [Integer]): Boolean` (internal)
- `EmailFile(AttachmentStream: Instream; AttachmentName: Text; HtmlBodyFilePath: Text; EmailSubject: Text; ToEmailAddress: Text; HideDialog: Boolean; EmailScenario: Enum "Email Scenario"): Boolean` (obsolete 27.0: Use procedure EmailFile that accepts a "Temp Blob" for the html body instead.)
- `EmailFile(AttachmentStream: Instream; AttachmentName: Text; var HtmlBody: Codeunit "Temp Blob"; EmailSubject: Text; ToEmailAddress: Text; HideDialog: Boolean; EmailScenario: Enum "Email Scenario"): Boolean`
- `EmailFile(AttachmentStream: Instream; AttachmentName: Text; HtmlBodyFilePath: Text[250]; PostedDocNo: Code[20]; ToEmailAddress: Text[250]; EmailDocName: Text[250]; HideDialog: Boolean; ReportUsage: Integer): Boolean` (obsolete 27.0: Use procedure EmailFile that accepts a "Temp Blob" for the html body instead.)
- `EmailFile(AttachmentStream: Instream; AttachmentName: Text; var HtmlBody: Codeunit "Temp Blob"; PostedDocNo: Code[20]; ToEmailAddress: Text[250]; EmailDocName: Text[250]; HideDialog: Boolean; ReportUsage: Integer): Boolean`
- `EmailFile(AttachmentStream: Instream; AttachmentName: Text; HtmlBodyFilePath: Text; EmailSubject: Text; ToEmailAddress: Text; HideDialog: Boolean; EmailScenario: Enum "Email Scenario"; SourceReference: RecordRef): Boolean` (obsolete 27.0: Use procedure EmailFile that accepts a "Temp Blob" for the html body instead.)
- `EmailFile(AttachmentStream: Instream; AttachmentName: Text; var HtmlBody: Codeunit "Temp Blob"; EmailSubject: Text; ToEmailAddress: Text; HideDialog: Boolean; EmailScenario: Enum "Email Scenario"; SourceReference: RecordRef): Boolean`
- `EmailFile(AttachmentStream: Instream; AttachmentName: Text; HtmlBodyFilePath: Text; EmailSubject: Text; ToEmailAddress: Text; HideDialog: Boolean; EmailScenario: Enum "Email Scenario"; SourceTables: List of [Integer]; SourceIDs: List of [Guid]; SourceRelationTypes: List of [Integer]): Boolean` (obsolete 27.0: Use procedure EmailFile that accepts a "Temp Blob" for the html body instead.)
- `EmailFile(AttachmentStream: Instream; AttachmentName: Text; var HtmlBody: Codeunit "Temp Blob"; EmailSubject: Text; ToEmailAddress: Text; HideDialog: Boolean; EmailScenario: Enum "Email Scenario"; SourceTables: List of [Integer]; SourceIDs: List of [Guid]; SourceRelationTypes: List of [Integer]): Boolean`
- `EmailFile(AttachmentStream: Instream; AttachmentName: Text; HtmlBodyFilePath: Text[250]; PostedDocNo: Code[20]; ToEmailAddress: Text[250]; EmailDocName: Text[250]; HideDialog: Boolean; ReportUsage: Integer; SourceReference: RecordRef): Boolean` (obsolete 27.0: Use procedure EmailFile that accepts a "Temp Blob" for the html body instead.)
- `EmailFile(AttachmentStream: Instream; AttachmentName: Text; var HtmlBody: Codeunit "Temp Blob"; PostedDocNo: Code[20]; ToEmailAddress: Text[250]; EmailDocName: Text[250]; HideDialog: Boolean; ReportUsage: Integer; SourceReference: RecordRef): Boolean`
- `EmailFile(AttachmentStream: Instream; AttachmentName: Text; HtmlBodyInstream: InStream; EmailSubject: Text; ToEmailAddress: Text; HideDialog: Boolean; EmailScenario: Enum "Email Scenario"; SourceTables: List of [Integer]; SourceIDs: List of [Guid]; SourceRelationTypes: List of [Integer]): Boolean`
- `EmailFile(AttachmentStream: Instream; AttachmentName: Text; HtmlBodyFilePath: Text[250]; PostedDocNo: Code[20]; ToEmailAddress: Text[250]; EmailDocName: Text[250]; HideDialog: Boolean; ReportUsage: Integer; SourceTables: List of [Integer]; SourceIDs: List of [Guid]; SourceRelationTypes: List of [Integer]): Boolean` (obsolete 27.0: Use procedure EmailFile that accepts a "Temp Blob" for the html body instead.)
- `EmailFile(AttachmentStream: Instream; AttachmentName: Text; var EmailBody: Codeunit "Temp Blob"; PostedDocNo: Code[20]; ToEmailAddress: Text[250]; EmailDocName: Text[250]; HideDialog: Boolean; ReportUsage: Integer; SourceTables: List of [Integer]; SourceIDs: List of [Guid]; SourceRelationTypes: List of [Integer]): Boolean`
- `EmailFile(AttachmentStream: Instream; AttachmentName: Text; var HtmlBody: Codeunit "Temp Blob"; EmailSubject: Text[250]; PostedDocNo: Code[20]; ToEmailAddress: Text[250]; EmailDocName: Text[250]; HideDialog: Boolean; ReportUsage: Integer; SourceTables: List of [Integer]; SourceIDs: List of [Guid]; SourceRelationTypes: List of [Integer]): Boolean`
- `EmailFile(AttachmentStream: Instream; AttachmentName: Text; HtmlBodyInstream: Instream; PostedDocNo: Code[20]; ToEmailAddress: Text[250]; EmailDocName: Text[250]; HideDialog: Boolean; ReportUsage: Integer; SourceTables: List of [Integer]; SourceIDs: List of [Guid]; SourceRelationTypes: List of [Integer]): Boolean`
- `EmailFileWithSubjectAndReportUsage(AttachmentStream: InStream; AttachmentName: Text; HtmlBodyFilePath: Text[250]; EmailSubject: Text[250]; PostedDocNo: Code[20]; ToEmailAddress: Text[250]; EmailDocName: Text[250]; HideDialog: Boolean; ReportUsage: Integer): Boolean` (obsolete 27.0: Use procedure EmailFileWithSubjectAndReportUsage that accepts a "Temp Blob" for the html body instead.)
- `EmailFileWithSubjectAndReportUsage(AttachmentStream: InStream; AttachmentName: Text; var HtmlBody: Codeunit "Temp Blob"; EmailSubject: Text[250]; PostedDocNo: Code[20]; ToEmailAddress: Text[250]; EmailDocName: Text[250]; HideDialog: Boolean; ReportUsage: Integer): Boolean`
- `EmailFileWithSubjectAndReportUsage(AttachmentStream: InStream; AttachmentName: Text; HtmlBodyFilePath: Text[250]; EmailSubject: Text[250]; PostedDocNo: Code[20]; ToEmailAddress: Text[250]; EmailDocName: Text[250]; HideDialog: Boolean; ReportUsage: Integer; SourceReference: RecordRef): Boolean` (obsolete 27.0: Use procedure EmailFileWithSubjectAndReportUsage that accepts a "Temp Blob" for the html body instead.)
- `EmailFileWithSubjectAndReportUsage(AttachmentStream: InStream; AttachmentName: Text; var HtmlBody: Codeunit "Temp Blob"; EmailSubject: Text[250]; PostedDocNo: Code[20]; ToEmailAddress: Text[250]; EmailDocName: Text[250]; HideDialog: Boolean; ReportUsage: Integer; SourceReference: RecordRef): Boolean`
- `EmailFileWithSubjectAndReportUsage(AttachmentStream: InStream; AttachmentName: Text; HtmlBodyFilePath: Text[250]; EmailSubject: Text[250]; PostedDocNo: Code[20]; ToEmailAddress: Text[250]; EmailDocName: Text[250]; HideDialog: Boolean; ReportUsage: Integer; SourceTables: List of [Integer]; SourceIDs: List of [Guid]; SourceRelationTypes: List of [Integer]): Boolean` (obsolete 27.0: Use procedure EmailFileWithSubjectAndReportUsage that accepts a "Temp Blob" for the html body instead.)
- `EmailFileWithSubjectAndReportUsage(AttachmentStream: InStream; AttachmentName: Text; var HtmlBody: Codeunit "Temp Blob"; EmailSubject: Text[250]; PostedDocNo: Code[20]; ToEmailAddress: Text[250]; EmailDocName: Text[250]; HideDialog: Boolean; ReportUsage: Integer; SourceTables: List of [Integer]; SourceIDs: List of [Guid]; SourceRelationTypes: List of [Integer]): Boolean`
- `GetToAddressFromCustomer(BillToCustomerNo: Code[20]): Text[250]`
- `GetToAddressFromVendor(BuyFromVendorNo: Code[20]): Text[250]`
- `GetAttachmentFileName(var AttachmentFileName: Text[250]; PostedDocNo: Code[20]; EmailDocumentName: Text[250]; ReportUsage: Integer)`
- `GetEmailBody(PostedDocNo: Code[20]; ReportUsage: Integer; CustomerNo: Code[20]): Text`
- `ReplaceCustomerNameWithPlaceholder(CustomerNo: Code[20]; BodyText: Text): Text`
- `GetEmailSubject(PostedDocNo: Code[20]; EmailDocumentName: Text[250]; ReportUsage: Integer): Text[250]`
- `EmailFileFromStream(AttachmentStream: InStream; AttachmentName: Text; Body: Text; Subject: Text; MailTo: Text; HideDialog: Boolean; ReportUsage: Integer): Boolean`
- `EmailHtmlFromStream(MailInStream: InStream; ToEmailAddress: Text[250]; Subject: Text; HideDialog: Boolean; ReportUsage: Integer): Boolean`
- `EmailFileAndHtmlFromStream(AttachmentStream: InStream; AttachmentName: Text; MailInStream: InStream; ToEmailAddress: Text[250]; Subject: Text; HideDialog: Boolean; ReportUsage: Integer): Boolean`
- `EmailFileAndHtmlFromStream(AttachmentStream: InStream; AttachmentName: Text; MailInStream: InStream; ToEmailAddress: Text[250]; Subject: Text; HideDialog: Boolean; ReportUsage: Integer; PostedDocNo: Code[20]; IsFromPostedDoc: Boolean): Boolean`

Plus 4 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 472 "Job Queue Entry"](../table/472.md)

## 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 4100 "Temp Blob"](../codeunit/4100.md) (3 calls: `EmailFileInternal → CreateInStream`, `EmailFileInternal → HasValue`, `EmailHtmlFromStream → CreateOutStream`)
- [Codeunit 1630 "Office Management"](../codeunit/1630.md) (2 calls: `EmailFileInternal → AttachAvailable`, `EmailFileInternal → AttachDocument`)
- [Codeunit 4102 "Temp Blob List"](../codeunit/4102.md) (2 calls: `EmailFileInternal → (object)`, `EmailFileInternal → Get`)
- [Codeunit 8891 "Email Scenario Mapping"](../codeunit/8891.md) (1 call: `EmailFileInternal → FromReportSelectionUsage`)

## Called by

- [Codeunit 452 "Report Distribution Management"](../codeunit/452.md) (3 calls: `SendAttachment → EmailFile`, `SendXmlEmailAttachment → GetToAddressFromCustomer`, `SendXmlEmailAttachmentVendor → GetToAddressFromVendor`)
- [Codeunit 5052 "AttachmentManagement"](../codeunit/5052.md) (2 calls: `SendEmailWithAttachment → EmailFile`, `SendHTMLEmail → EmailFile`)
- [Table 60 "Document Sending Profile"](../table/60.md) (2 calls: `SendToEMail → EmailFile`, `SendToEmailVendor → EmailFile`)
- [Codeunit 1509 "Notification Entry Dispatcher"](../codeunit/1509.md) (1 call: `CreateMailAndDispatch → EmailFile`)
- [Codeunit 20038 "APIV1 - Send Sales Document"](../codeunit/20038.md) (1 call: `SendCreditMemoCancelationEmail → EmailFileWithSubjectAndReportUsage`)
- [Codeunit 2103 "O365 Sales Cancel Invoice"](../codeunit/2103.md) (1 call: `SendInvoiceCancelationEmail → EmailFile`)
- [Codeunit 30038 "APIV2 - Send Sales Document"](../codeunit/30038.md) (1 call: `SendCreditMemoCancelationEmail → EmailFileWithSubjectAndReportUsage`)
- [Codeunit 431 "IC Outbox Export"](../codeunit/431.md) (1 call: `SendToExternalPartner → EnqueueEmailFile`)
- [Codeunit 4999 "Return Shpt. PDF Doc.Handler"](../codeunit/4999.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5001 "Bl. S. Order PDF Doc.Handler"](../codeunit/5001.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5002 "Bl. P. Order PDF Doc.Handler"](../codeunit/5002.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5003 "S. Ret. Order PDF Doc.Handler"](../codeunit/5003.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5004 "Sales Shipment PDF Doc.Handler"](../codeunit/5004.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5006 "Purch. Quote PDF Doc.Handler"](../codeunit/5006.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5007 "Purch. Rcpt. PDF Doc.Handler"](../codeunit/5007.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5008 "Return Receipt PDF Doc.Handler"](../codeunit/5008.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5009 "P. Ret. Order PDF Doc.Handler"](../codeunit/5009.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5017 "Trans. Order PDF Doc.Handler"](../codeunit/5017.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5018 "Trans. Shpt. PDF Doc.Handler"](../codeunit/5018.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5019 "Trans. Rcpt. PDF Doc.Handler"](../codeunit/5019.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5020 "S.Arch.Quote PDF Doc.Handler"](../codeunit/5020.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5021 "S.Arch.Order PDF Doc.Handler"](../codeunit/5021.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5022 "P.Arch.Quote PDF Doc.Handler"](../codeunit/5022.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5023 "P.Arch.Order PDF Doc.Handler"](../codeunit/5023.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5024 "S.Arch.Return PDF Doc.Handler"](../codeunit/5024.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5025 "P.Arch.Return PDF Doc.Handler"](../codeunit/5025.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5026 "Asm. Order PDF Doc.Handler"](../codeunit/5026.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5027 "P.Asm. Order PDF Doc.Handler"](../codeunit/5027.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5028 "S.Arch.Bl.Ord PDF Doc.Handler"](../codeunit/5028.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5029 "P.Arch.Bl.Ord PDF Doc.Handler"](../codeunit/5029.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5030 "Phys.Inv.Ord. PDF Doc.Handler"](../codeunit/5030.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5031 "P.Phys.InvOrd PDF Doc.Handler"](../codeunit/5031.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5032 "Phys.Inv.Rec. PDF Doc.Handler"](../codeunit/5032.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5033 "P.Phys.InvRec PDF Doc.Handler"](../codeunit/5033.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5034 "Inv. Shpt. PDF Doc.Handler"](../codeunit/5034.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5035 "Inv. Rcpt. PDF Doc.Handler"](../codeunit/5035.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5036 "P.Inv. Shpt. PDF Doc.Handler"](../codeunit/5036.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5037 "P.Inv. Rcpt. PDF Doc.Handler"](../codeunit/5037.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5038 "P.Direct Trans PDF Doc.Handler"](../codeunit/5038.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5069 "Word Template Interactions"](../codeunit/5069.md) (1 call: `SendMergedDocument → EmailFile`)
- [Codeunit 5441 "Sales Order PDF Doc.Handler"](../codeunit/5441.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5444 "Sales Cr.Memo PDF Doc.Handler"](../codeunit/5444.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5445 "Cust. St. PDF Doc.Handler"](../codeunit/5445.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5446 "Purch. Invoice PDF Doc.Handler"](../codeunit/5446.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5447 "Purch. Cr.Memo PDF Doc.Handler"](../codeunit/5447.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5449 "Sales Quote PDF Doc.Handler"](../codeunit/5449.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5450 "Sales Invoice PDF Doc.Handler"](../codeunit/5450.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5453 "Purch. Order PDF Doc.Handler"](../codeunit/5453.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5454 "Project PDF Doc.Handler"](../codeunit/5454.md) (1 call: `GeneratePdfBlobWithDocumentType → GetAttachmentFileName`)
- [Codeunit 5467 "PDF Document Management"](../codeunit/5467.md) (1 call: `GeneratePdf → GetAttachmentFileName`)
- and 3 more: data/code/graph/29/calls.json

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-25, BC27

## Deprecations

- procedure EmailFile: Pending 27.0 (#if not CLEAN27), "Use procedure EmailFile that accepts a "Temp Blob" for the html body instead."
- procedure EmailFile: Pending 27.0 (#if not CLEAN27), "Use procedure EmailFile that accepts a "Temp Blob" for the html body instead."
- procedure EmailFile: Pending 27.0 (#if not CLEAN27), "Use procedure EmailFile that accepts a "Temp Blob" for the html body instead."
- procedure EmailFile: Pending 27.0 (#if not CLEAN27), "Use procedure EmailFile that accepts a "Temp Blob" for the html body instead."
- procedure EmailFile: Pending 27.0 (#if not CLEAN27), "Use procedure EmailFile that accepts a "Temp Blob" for the html body instead."
- procedure EmailFile: Pending 27.0 (#if not CLEAN27), "Use procedure EmailFile that accepts a "Temp Blob" for the html body instead."
- procedure EmailFileWithSubjectAndReportUsage: Pending 27.0 (#if not CLEAN27), "Use procedure EmailFileWithSubjectAndReportUsage that accepts a "Temp Blob" for the html body instead."
- procedure EmailFileWithSubjectAndReportUsage: Pending 27.0 (#if not CLEAN27), "Use procedure EmailFileWithSubjectAndReportUsage that accepts a "Temp Blob" for the html body instead."
- procedure EmailFileWithSubjectAndReportUsage: Pending 27.0 (#if not CLEAN27), "Use procedure EmailFileWithSubjectAndReportUsage that accepts a "Temp Blob" for the html body instead."
- procedure OnBeforeEmailFileInternal: Pending 27.0 (#if not CLEAN27), "Use new Event OnBeforeEmailItemPreparation instead."

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