EmailClient (preview:2025-01-15)

2025/01/15 • 2 new methods

Email_GetSendResult (new)
Description Gets the status of the email send operation.
Reference Link ¶

⚼ Request

GET:  /emails/operations/{operationId}
{
operationId: string ,
api-version: string ,
}

⚐ Response (default)

{
$headers:
{
x-ms-error-code: string ,
}
,
$schema:
{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
}
,
}

⚐ Response (200)

{
$headers:
{
retry-after: integer ,
}
,
$schema:
{
id: string ,
status: enum ,
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
}
,
}
Email_Send (new)
Description Queues an email message to be sent to one or more recipients
Reference Link ¶

⚼ Request

POST:  /emails:send
{
Operation-Id: string ,
x-ms-client-request-id: string ,
api-version: string ,
emailMessage:
{
headers: object ,
senderAddress: string ,
senderDisplayName: string ,
content:
{
subject: string ,
plainText: string ,
html: string ,
}
,
recipients:
{
to:
[
{
address: string ,
displayName: string ,
}
,
]
,
cc:
[
{
address: string ,
displayName: string ,
}
,
]
,
bcc:
[
{
address: string ,
displayName: string ,
}
,
]
,
}
,
attachments:
[
{
name: string ,
contentType: string ,
contentInBase64: string ,
contentId: string ,
}
,
]
,
replyTo:
[
{
address: string ,
displayName: string ,
}
,
]
,
userEngagementTrackingDisabled: boolean ,
}
,
}

⚐ Response (default)

{
$headers:
{
x-ms-error-code: string ,
}
,
$schema:
{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
}
,
}

⚐ Response (202)

{
$headers:
{
operation-location: string ,
retry-after: integer ,
}
,
$schema:
{
id: string ,
status: enum ,
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
}
,
}