Table of Contents

Table "Email Item"

ID 9500
Namespace: System.EMail

Properties

Name Value
Caption Email Item
DataClassification CustomerContent

Fields

Name Type Description
ID Guid
"From Name" Text[100]
"From Address" Text[250]
"Send to" Text[250]
"Send CC" Text[250]
"Send BCC" Text[250]
Subject Text[250]
Body Blob
"Attachment File Path" Text[250]
"Attachment Name" Text[250]
"Plaintext Formatted" Boolean
"Body File Path" Text[250]
"Message Type" Option
"Send as HTML" Boolean
"Attachment File Path 2" Text[250]
"Attachment Name 2" Text[50]
"Attachment File Path 3" Text[250]
"Attachment Name 3" Text[50]
"Attachment File Path 4" Text[250]
"Attachment Name 4" Text[50]
"Attachment File Path 5" Text[250]
"Attachment Name 5" Text[50]
"Attachment File Path 6" Text[250]
"Attachment Name 6" Text[50]
"Attachment File Path 7" Text[250]
"Attachment Name 7" Text[50]
SystemId Guid
SystemCreatedAt DateTime
SystemCreatedBy Guid
SystemModifiedAt DateTime
SystemModifiedBy Guid
SystemCreatedByUserName Text[50]
SystemCreatedByFullName Text[80]
SystemModifiedByUserName Text[50]
SystemModifiedByFullName Text[80]
SystemRowVersion BigInteger

Methods

HasAttachments

procedure HasAttachments(): Boolean

Returns

Type Description
Boolean

GetAttachments

procedure GetAttachments(var TempBlobList: Codeunit "Temp Blob List"; var Names: List of [Text])

Parameters

Name Type Description
TempBlobList Codeunit System.Utilities."Temp Blob List"
Names List of [Text]

SetAttachments

procedure SetAttachments(TempBlobList: Codeunit "Temp Blob List"; Names: List of [Text])

Parameters

Name Type Description
TempBlobList Codeunit System.Utilities."Temp Blob List"
Names List of [Text]

AddAttachment

procedure AddAttachment(AttachmentStream: InStream; AttachmentName: Text)

Parameters

Name Type Description
AttachmentStream InStream
AttachmentName Text

AddSourceDocument

procedure AddSourceDocument(TableID: Integer; SourceID: Guid)

Parameters

Name Type Description
TableID Integer
SourceID Guid

AddSourceDocument

procedure AddSourceDocument(TableID: Integer; SourceID: Guid; RelationType: Enum "Email Relation Type")

Parameters

Name Type Description
TableID Integer
SourceID Guid
RelationType Enum System.Email."Email Relation Type"

GetSourceDocuments

procedure GetSourceDocuments(var SourceTableList: List of [Integer]; var SourceIDList: List of [Guid]; var SourceRelationTypeList: List of [Integer])

Parameters

Name Type Description
SourceTableList List of [Integer]
SourceIDList List of [Guid]
SourceRelationTypeList List of [Integer]

SetSourceDocuments

procedure SetSourceDocuments(NewSourceTables: List of [Integer]; NewSourceIDs: List of [Guid]; NewSourceRelationTypes: List of [Integer])

Parameters

Name Type Description
NewSourceTables List of [Integer]
NewSourceIDs List of [Guid]
NewSourceRelationTypes List of [Integer]

Initialize

procedure Initialize()

Send

procedure Send(HideMailDialog: Boolean; EmailScenario: Enum "Email Scenario"): Boolean

Parameters

Name Type Description
HideMailDialog Boolean
EmailScenario Enum System.Email."Email Scenario"

Returns

Type Description
Boolean

Send

procedure Send(HideMailDialog: Boolean; EmailScenario: Enum "Email Scenario"; Enqueue: Boolean): Boolean

Parameters

Name Type Description
HideMailDialog Boolean
EmailScenario Enum System.Email."Email Scenario"
Enqueue Boolean

Returns

Type Description
Boolean

SetBodyText

procedure SetBodyText(Value: Text)

Parameters

Name Type Description
Value Text

SetBody

procedure SetBody(var TempBlob: Codeunit "Temp Blob")

Parameters

Name Type Description
TempBlob Codeunit System.Utilities."Temp Blob"

SetBody

procedure SetBody(var TempBlob: Codeunit "Temp Blob"; FormattedAsPlainText: Boolean)

Parameters

Name Type Description
TempBlob Codeunit System.Utilities."Temp Blob"
FormattedAsPlainText Boolean

GetBodyTextFromBlob

procedure GetBodyTextFromBlob(): Text

Returns

Type Description
Text

SendAsHTML

procedure SendAsHTML(SendAsHTML: Boolean)

Parameters

Name Type Description
SendAsHTML Boolean

Events

OnBeforeGetBodyText

[IntegrationEvent(False,False)]
local procedure OnBeforeGetBodyText(var EmailItem: Record "Email Item"; var Value: Text; var IsHandled: Boolean)

Parameters

Name Type Description
EmailItem Table System.EMail."Email Item"
Value Text
IsHandled Boolean

OnBeforeSend

[IntegrationEvent(False,False)]
local procedure OnBeforeSend(var EmailItem: Record "Email Item"; var HideMailDialog: Boolean; var MailManagement: Codeunit "Mail Management"; var EmailScenario: Enum "Email Scenario"; var Result: Boolean; var Enqueue: Boolean; var IsHandled: Boolean)

Parameters

Name Type Description
EmailItem Table System.EMail."Email Item"
HideMailDialog Boolean
MailManagement Codeunit System.EMail."Mail Management"
EmailScenario Enum System.Email."Email Scenario"
Result Boolean
Enqueue Boolean
IsHandled Boolean

OnBeforeSetAttachments

[IntegrationEvent(False,False)]
local procedure OnBeforeSetAttachments(var EmailItem: Record "Email Item"; var TempBlobList: Codeunit "Temp Blob List"; var Names: List of [Text])

Parameters

Name Type Description
EmailItem Table System.EMail."Email Item"
TempBlobList Codeunit System.Utilities."Temp Blob List"
Names List of [Text]

See also