Interface IEmailControllerApiAsync
Represents a collection of functions to interact with the API endpoints
Inherited Members
Namespace: mailslurp.Api
Assembly: mailslurp.dll
Syntax
public interface IEmailControllerApiAsync : IApiAccessor
Methods
View SourceApplyImapFlagOperationAsync(Guid, ImapFlagOperationOptions, int, CancellationToken)
Set IMAP flags associated with a message. Only supports '\Seen' flag.
Declaration
Task<EmailPreview> ApplyImapFlagOperationAsync(Guid emailId, ImapFlagOperationOptions imapFlagOperationOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
ImapFlagOperationOptions | imapFlagOperationOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<EmailPreview> | Task of EmailPreview |
Remarks
Apply RFC3501 section-2.3.2 IMAP flag operations on an email
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
ApplyImapFlagOperationWithHttpInfoAsync(Guid, ImapFlagOperationOptions, int, CancellationToken)
Set IMAP flags associated with a message. Only supports '\Seen' flag.
Declaration
Task<ApiResponse<EmailPreview>> ApplyImapFlagOperationWithHttpInfoAsync(Guid emailId, ImapFlagOperationOptions imapFlagOperationOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
ImapFlagOperationOptions | imapFlagOperationOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<EmailPreview>> | Task of ApiResponse (EmailPreview) |
Remarks
Apply RFC3501 section-2.3.2 IMAP flag operations on an email
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
CanSendAsync(Guid, SendEmailOptions, int, CancellationToken)
Check if email can be sent and options are valid.
Declaration
Task<CanSendEmailResults> CanSendAsync(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | inboxId | ID of the inbox you want to send the email from |
SendEmailOptions | sendEmailOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<CanSendEmailResults> | Task of CanSendEmailResults |
Remarks
Can user send email to given recipient or is the recipient blocked
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
CanSendWithHttpInfoAsync(Guid, SendEmailOptions, int, CancellationToken)
Check if email can be sent and options are valid.
Declaration
Task<ApiResponse<CanSendEmailResults>> CanSendWithHttpInfoAsync(Guid inboxId, SendEmailOptions sendEmailOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | inboxId | ID of the inbox you want to send the email from |
SendEmailOptions | sendEmailOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<CanSendEmailResults>> | Task of ApiResponse (CanSendEmailResults) |
Remarks
Can user send email to given recipient or is the recipient blocked
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
CheckEmailBodyAsync(Guid, int, CancellationToken)
Detect broken links, spelling, and images in email content
Declaration
Task<CheckEmailBodyResults> CheckEmailBodyAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<CheckEmailBodyResults> | Task of CheckEmailBodyResults |
Remarks
Find dead links, broken images, and spelling mistakes in email body. Will call included links via HTTP so do not invoke if your links are sensitive or stateful. Any resource that returns a 4xx or 5xx response or is not reachable via HEAD or GET HTTP operations will be considered unhealthy.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
CheckEmailBodyFeatureSupportAsync(Guid, int, CancellationToken)
Show which mail clients support the HTML and CSS features used in an email body.
Declaration
Task<CheckEmailBodyFeatureSupportResults> CheckEmailBodyFeatureSupportAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<CheckEmailBodyFeatureSupportResults> | Task of CheckEmailBodyFeatureSupportResults |
Remarks
Detect HTML and CSS features inside an email body and return a report of email client support across different platforms and versions.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
CheckEmailBodyFeatureSupportWithHttpInfoAsync(Guid, int, CancellationToken)
Show which mail clients support the HTML and CSS features used in an email body.
Declaration
Task<ApiResponse<CheckEmailBodyFeatureSupportResults>> CheckEmailBodyFeatureSupportWithHttpInfoAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<CheckEmailBodyFeatureSupportResults>> | Task of ApiResponse (CheckEmailBodyFeatureSupportResults) |
Remarks
Detect HTML and CSS features inside an email body and return a report of email client support across different platforms and versions.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
CheckEmailBodyWithHttpInfoAsync(Guid, int, CancellationToken)
Detect broken links, spelling, and images in email content
Declaration
Task<ApiResponse<CheckEmailBodyResults>> CheckEmailBodyWithHttpInfoAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<CheckEmailBodyResults>> | Task of ApiResponse (CheckEmailBodyResults) |
Remarks
Find dead links, broken images, and spelling mistakes in email body. Will call included links via HTTP so do not invoke if your links are sensitive or stateful. Any resource that returns a 4xx or 5xx response or is not reachable via HEAD or GET HTTP operations will be considered unhealthy.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
CheckEmailClientSupportAsync(CheckEmailClientSupportOptions, int, CancellationToken)
Show which email programs and devices support the features used in an email body.
Declaration
Task<CheckEmailClientSupportResults> CheckEmailClientSupportAsync(CheckEmailClientSupportOptions checkEmailClientSupportOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CheckEmailClientSupportOptions | checkEmailClientSupportOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<CheckEmailClientSupportResults> | Task of CheckEmailClientSupportResults |
Remarks
Evaluate the features used in an email body and return a report of email client support across different platforms and versions.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
CheckEmailClientSupportWithHttpInfoAsync(CheckEmailClientSupportOptions, int, CancellationToken)
Show which email programs and devices support the features used in an email body.
Declaration
Task<ApiResponse<CheckEmailClientSupportResults>> CheckEmailClientSupportWithHttpInfoAsync(CheckEmailClientSupportOptions checkEmailClientSupportOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CheckEmailClientSupportOptions | checkEmailClientSupportOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<CheckEmailClientSupportResults>> | Task of ApiResponse (CheckEmailClientSupportResults) |
Remarks
Evaluate the features used in an email body and return a report of email client support across different platforms and versions.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DeleteAllEmailsAsync(int, CancellationToken)
Delete all emails in all inboxes.
Declaration
Task DeleteAllEmailsAsync(int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task | Task of void |
Remarks
Deletes all emails in your account. Be careful as emails cannot be recovered
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DeleteAllEmailsWithHttpInfoAsync(int, CancellationToken)
Delete all emails in all inboxes.
Declaration
Task<ApiResponse<object>> DeleteAllEmailsWithHttpInfoAsync(int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<object>> | Task of ApiResponse |
Remarks
Deletes all emails in your account. Be careful as emails cannot be recovered
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DeleteEmailAsync(Guid, int, CancellationToken)
Delete an email
Declaration
Task DeleteEmailAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email to delete |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task | Task of void |
Remarks
Deletes an email and removes it from the inbox. Deleted emails cannot be recovered.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DeleteEmailWithHttpInfoAsync(Guid, int, CancellationToken)
Delete an email
Declaration
Task<ApiResponse<object>> DeleteEmailWithHttpInfoAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email to delete |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<object>> | Task of ApiResponse |
Remarks
Deletes an email and removes it from the inbox. Deleted emails cannot be recovered.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DownloadAttachmentAsync(Guid, string, string, int, CancellationToken)
Get email attachment bytes. Returned as octet-stream
with content type header. If you have trouble with byte responses try the downloadAttachmentBase64
response endpoints and convert the base 64 encoded content to a file or string.
Declaration
Task<byte[]> DownloadAttachmentAsync(Guid emailId, string attachmentId, string apiKey = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
string | attachmentId | ID of attachment |
string | apiKey | Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<byte[]> | Task of byte[] |
Remarks
Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DownloadAttachmentBase64Async(Guid, string, int, CancellationToken)
Get email attachment as base64 encoded string as an alternative to binary responses. Decode the base64FileContents
as a utf-8
encoded string or array of bytes depending on the contentType
.
Declaration
Task<DownloadAttachmentDto> DownloadAttachmentBase64Async(Guid emailId, string attachmentId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
string | attachmentId | ID of attachment |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<DownloadAttachmentDto> | Task of DownloadAttachmentDto |
Remarks
Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the downloadAttachment
method but allows some clients to get around issues with binary responses.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DownloadAttachmentBase64WithHttpInfoAsync(Guid, string, int, CancellationToken)
Get email attachment as base64 encoded string as an alternative to binary responses. Decode the base64FileContents
as a utf-8
encoded string or array of bytes depending on the contentType
.
Declaration
Task<ApiResponse<DownloadAttachmentDto>> DownloadAttachmentBase64WithHttpInfoAsync(Guid emailId, string attachmentId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
string | attachmentId | ID of attachment |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<DownloadAttachmentDto>> | Task of ApiResponse (DownloadAttachmentDto) |
Remarks
Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the downloadAttachment
method but allows some clients to get around issues with binary responses.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DownloadAttachmentWithHttpInfoAsync(Guid, string, string, int, CancellationToken)
Get email attachment bytes. Returned as octet-stream
with content type header. If you have trouble with byte responses try the downloadAttachmentBase64
response endpoints and convert the base 64 encoded content to a file or string.
Declaration
Task<ApiResponse<byte[]>> DownloadAttachmentWithHttpInfoAsync(Guid emailId, string attachmentId, string apiKey = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
string | attachmentId | ID of attachment |
string | apiKey | Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<byte[]>> | Task of ApiResponse (byte[]) |
Remarks
Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DownloadBodyAsync(Guid, int, CancellationToken)
Get email body as string. Returned as plain/text
with content type header.
Declaration
Task<string> DownloadBodyAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<string> | Task of string |
Remarks
Returns the specified email body for a given email as a string
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DownloadBodyBytesAsync(Guid, int, CancellationToken)
Get email body in bytes. Returned as octet-stream
with content type header.
Declaration
Task<byte[]> DownloadBodyBytesAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<byte[]> | Task of byte[] |
Remarks
Returns the specified email body for a given email as a stream / array of bytes.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DownloadBodyBytesWithHttpInfoAsync(Guid, int, CancellationToken)
Get email body in bytes. Returned as octet-stream
with content type header.
Declaration
Task<ApiResponse<byte[]>> DownloadBodyBytesWithHttpInfoAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<byte[]>> | Task of ApiResponse (byte[]) |
Remarks
Returns the specified email body for a given email as a stream / array of bytes.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
DownloadBodyWithHttpInfoAsync(Guid, int, CancellationToken)
Get email body as string. Returned as plain/text
with content type header.
Declaration
Task<ApiResponse<string>> DownloadBodyWithHttpInfoAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<string>> | Task of ApiResponse (string) |
Remarks
Returns the specified email body for a given email as a string
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
ForwardEmailAsync(Guid, ForwardEmailOptions, int, CancellationToken)
Forward email to recipients
Declaration
Task<SentEmailDto> ForwardEmailAsync(Guid emailId, ForwardEmailOptions forwardEmailOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
ForwardEmailOptions | forwardEmailOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<SentEmailDto> | Task of SentEmailDto |
Remarks
Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the from
option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
ForwardEmailWithHttpInfoAsync(Guid, ForwardEmailOptions, int, CancellationToken)
Forward email to recipients
Declaration
Task<ApiResponse<SentEmailDto>> ForwardEmailWithHttpInfoAsync(Guid emailId, ForwardEmailOptions forwardEmailOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
ForwardEmailOptions | forwardEmailOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<SentEmailDto>> | Task of ApiResponse (SentEmailDto) |
Remarks
Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the from
option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAttachmentMetaDataAsync(Guid, string, int, CancellationToken)
Get email attachment metadata. This is the contentType
and contentLength
of an attachment. To get the individual attachments use the downloadAttachment
methods.
Declaration
Task<AttachmentMetaData> GetAttachmentMetaDataAsync(Guid emailId, string attachmentId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
string | attachmentId | ID of attachment |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<AttachmentMetaData> | Task of AttachmentMetaData |
Remarks
Returns the metadata such as name and content-type for a given attachment and email.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetAttachmentMetaDataWithHttpInfoAsync(Guid, string, int, CancellationToken)
Get email attachment metadata. This is the contentType
and contentLength
of an attachment. To get the individual attachments use the downloadAttachment
methods.
Declaration
Task<ApiResponse<AttachmentMetaData>> GetAttachmentMetaDataWithHttpInfoAsync(Guid emailId, string attachmentId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
string | attachmentId | ID of attachment |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<AttachmentMetaData>> | Task of ApiResponse (AttachmentMetaData) |
Remarks
Returns the metadata such as name and content-type for a given attachment and email.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailAsync(Guid, bool?, int, CancellationToken)
Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController.
Declaration
Task<Email> GetEmailAsync(Guid emailId, bool? decode = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
bool? | decode | Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<Email> | Task of Email |
Remarks
Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailAttachmentsAsync(Guid, int, CancellationToken)
Get all email attachment metadata. Metadata includes name and size of attachments.
Declaration
Task<List<AttachmentMetaData>> GetEmailAttachmentsAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<System.Collections.Generic.List<T><AttachmentMetaData>> | Task of List<AttachmentMetaData> |
Remarks
Returns an array of attachment metadata such as name and content-type for a given email if present.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailAttachmentsWithHttpInfoAsync(Guid, int, CancellationToken)
Get all email attachment metadata. Metadata includes name and size of attachments.
Declaration
Task<ApiResponse<List<AttachmentMetaData>>> GetEmailAttachmentsWithHttpInfoAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<System.Collections.Generic.List<T><AttachmentMetaData>>> | Task of ApiResponse (List<AttachmentMetaData>) |
Remarks
Returns an array of attachment metadata such as name and content-type for a given email if present.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailContentMatchAsync(Guid, ContentMatchOptions, int, CancellationToken)
Get email content regex pattern match results. Runs regex against email body and returns match groups.
Declaration
Task<EmailContentMatchResult> GetEmailContentMatchAsync(Guid emailId, ContentMatchOptions contentMatchOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email to match against |
ContentMatchOptions | contentMatchOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<EmailContentMatchResult> | Task of EmailContentMatchResult |
Remarks
Return the matches for a given Java style regex pattern. Do not include the typical /
at start or end of regex in some languages. Given an example your code is: 12345
the pattern to extract match looks like code is: (\\d{6})
. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: ['code is: 123456', '123456']
See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailContentMatchWithHttpInfoAsync(Guid, ContentMatchOptions, int, CancellationToken)
Get email content regex pattern match results. Runs regex against email body and returns match groups.
Declaration
Task<ApiResponse<EmailContentMatchResult>> GetEmailContentMatchWithHttpInfoAsync(Guid emailId, ContentMatchOptions contentMatchOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email to match against |
ContentMatchOptions | contentMatchOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<EmailContentMatchResult>> | Task of ApiResponse (EmailContentMatchResult) |
Remarks
Return the matches for a given Java style regex pattern. Do not include the typical /
at start or end of regex in some languages. Given an example your code is: 12345
the pattern to extract match looks like code is: (\\d{6})
. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: ['code is: 123456', '123456']
See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailContentPartAsync(Guid, string, int, CancellationToken)
Get email content part by content type
Declaration
Task<EmailContentPartResult> GetEmailContentPartAsync(Guid emailId, string contentType, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email to match against |
string | contentType | Content type |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<EmailContentPartResult> | Task of EmailContentPartResult |
Remarks
Get email body content parts from a multipart email message for a given content type
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailContentPartWithHttpInfoAsync(Guid, string, int, CancellationToken)
Get email content part by content type
Declaration
Task<ApiResponse<EmailContentPartResult>> GetEmailContentPartWithHttpInfoAsync(Guid emailId, string contentType, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email to match against |
string | contentType | Content type |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<EmailContentPartResult>> | Task of ApiResponse (EmailContentPartResult) |
Remarks
Get email body content parts from a multipart email message for a given content type
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailCountAsync(Guid?, int, CancellationToken)
Get email count
Declaration
Task<CountDto> GetEmailCountAsync(Guid? inboxId = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid? | inboxId | (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<CountDto> | Task of CountDto |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailCountWithHttpInfoAsync(Guid?, int, CancellationToken)
Get email count
Declaration
Task<ApiResponse<CountDto>> GetEmailCountWithHttpInfoAsync(Guid? inboxId = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid? | inboxId | (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<CountDto>> | Task of ApiResponse (CountDto) |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailHTMLAsync(Guid, bool?, bool?, int, CancellationToken)
Get email content as HTML. For displaying emails in browser context.
Declaration
Task<string> GetEmailHTMLAsync(Guid emailId, bool? decode = null, bool? replaceCidImages = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
bool? | decode | (optional, default to false) |
bool? | replaceCidImages | (optional, default to false) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<string> | Task of string |
Remarks
Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: ?apiKey=xxx
. Returns content-type text/html;charset=utf-8
so you must call expecting that content response not JSON. For JSON response see the getEmailHTMLJson
method.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailHTMLJsonAsync(Guid, bool?, bool?, int, CancellationToken)
Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content
Declaration
Task<EmailHtmlDto> GetEmailHTMLJsonAsync(Guid emailId, bool? decode = null, bool? replaceCidImages = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
bool? | decode | (optional, default to false) |
bool? | replaceCidImages | (optional, default to false) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<EmailHtmlDto> | Task of EmailHtmlDto |
Remarks
Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type application/json;charset=utf-8
so you must call expecting that content response not JSON.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailHTMLJsonWithHttpInfoAsync(Guid, bool?, bool?, int, CancellationToken)
Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content
Declaration
Task<ApiResponse<EmailHtmlDto>> GetEmailHTMLJsonWithHttpInfoAsync(Guid emailId, bool? decode = null, bool? replaceCidImages = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
bool? | decode | (optional, default to false) |
bool? | replaceCidImages | (optional, default to false) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<EmailHtmlDto>> | Task of ApiResponse (EmailHtmlDto) |
Remarks
Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type application/json;charset=utf-8
so you must call expecting that content response not JSON.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailHTMLQueryAsync(Guid, string, int, CancellationToken)
Parse and return text from an email, stripping HTML and decoding encoded characters
Declaration
Task<EmailTextLinesResult> GetEmailHTMLQueryAsync(Guid emailId, string htmlSelector, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email to perform HTML query on |
string | htmlSelector | HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<EmailTextLinesResult> | Task of EmailTextLinesResult |
Remarks
Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailHTMLQueryWithHttpInfoAsync(Guid, string, int, CancellationToken)
Parse and return text from an email, stripping HTML and decoding encoded characters
Declaration
Task<ApiResponse<EmailTextLinesResult>> GetEmailHTMLQueryWithHttpInfoAsync(Guid emailId, string htmlSelector, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email to perform HTML query on |
string | htmlSelector | HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<EmailTextLinesResult>> | Task of ApiResponse (EmailTextLinesResult) |
Remarks
Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailHTMLWithHttpInfoAsync(Guid, bool?, bool?, int, CancellationToken)
Get email content as HTML. For displaying emails in browser context.
Declaration
Task<ApiResponse<string>> GetEmailHTMLWithHttpInfoAsync(Guid emailId, bool? decode = null, bool? replaceCidImages = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
bool? | decode | (optional, default to false) |
bool? | replaceCidImages | (optional, default to false) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<string>> | Task of ApiResponse (string) |
Remarks
Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: ?apiKey=xxx
. Returns content-type text/html;charset=utf-8
so you must call expecting that content response not JSON. For JSON response see the getEmailHTMLJson
method.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailLinksAsync(Guid, int, CancellationToken)
Parse and return list of links found in an email (only works for HTML content)
Declaration
Task<EmailLinksResult> GetEmailLinksAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email to fetch text for |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<EmailLinksResult> | Task of EmailLinksResult |
Remarks
HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailLinksWithHttpInfoAsync(Guid, int, CancellationToken)
Parse and return list of links found in an email (only works for HTML content)
Declaration
Task<ApiResponse<EmailLinksResult>> GetEmailLinksWithHttpInfoAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email to fetch text for |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<EmailLinksResult>> | Task of ApiResponse (EmailLinksResult) |
Remarks
HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailPreviewURLsAsync(Guid, int, CancellationToken)
Get email URLs for viewing in browser or downloading
Declaration
Task<EmailPreviewUrls> GetEmailPreviewURLsAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<EmailPreviewUrls> | Task of EmailPreviewUrls |
Remarks
Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailPreviewURLsWithHttpInfoAsync(Guid, int, CancellationToken)
Get email URLs for viewing in browser or downloading
Declaration
Task<ApiResponse<EmailPreviewUrls>> GetEmailPreviewURLsWithHttpInfoAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<EmailPreviewUrls>> | Task of ApiResponse (EmailPreviewUrls) |
Remarks
Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailScreenshotAsBase64Async(Guid, GetEmailScreenshotOptions, int, CancellationToken)
Take a screenshot of an email in a browser and return base64 encoded string
Declaration
Task<EmailScreenshotResult> GetEmailScreenshotAsBase64Async(Guid emailId, GetEmailScreenshotOptions getEmailScreenshotOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
GetEmailScreenshotOptions | getEmailScreenshotOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<EmailScreenshotResult> | Task of EmailScreenshotResult |
Remarks
Capture image of email screenshot and return as base64 encoded string. Useful for embedding in HTML. Be careful as this may contain sensitive information.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailScreenshotAsBase64WithHttpInfoAsync(Guid, GetEmailScreenshotOptions, int, CancellationToken)
Take a screenshot of an email in a browser and return base64 encoded string
Declaration
Task<ApiResponse<EmailScreenshotResult>> GetEmailScreenshotAsBase64WithHttpInfoAsync(Guid emailId, GetEmailScreenshotOptions getEmailScreenshotOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
GetEmailScreenshotOptions | getEmailScreenshotOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<EmailScreenshotResult>> | Task of ApiResponse (EmailScreenshotResult) |
Remarks
Capture image of email screenshot and return as base64 encoded string. Useful for embedding in HTML. Be careful as this may contain sensitive information.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailScreenshotAsBinaryAsync(Guid, GetEmailScreenshotOptions, int, CancellationToken)
Take a screenshot of an email in a browser
Declaration
Task GetEmailScreenshotAsBinaryAsync(Guid emailId, GetEmailScreenshotOptions getEmailScreenshotOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
GetEmailScreenshotOptions | getEmailScreenshotOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task | Task of void |
Remarks
Returns binary octet-stream of screenshot of the given email
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailScreenshotAsBinaryWithHttpInfoAsync(Guid, GetEmailScreenshotOptions, int, CancellationToken)
Take a screenshot of an email in a browser
Declaration
Task<ApiResponse<object>> GetEmailScreenshotAsBinaryWithHttpInfoAsync(Guid emailId, GetEmailScreenshotOptions getEmailScreenshotOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
GetEmailScreenshotOptions | getEmailScreenshotOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<object>> | Task of ApiResponse |
Remarks
Returns binary octet-stream of screenshot of the given email
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailsOffsetPaginatedAsync(List<Guid>, int?, int?, string, bool?, string, DateTime?, DateTime?, int, CancellationToken)
Get all emails in all inboxes in paginated form. Email API list all.
Declaration
Task<PageEmailProjection> GetEmailsOffsetPaginatedAsync(List<Guid> inboxId = null, int? page = null, int? size = null, string sort = null, bool? unreadOnly = null, string searchFilter = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T><System.Guid> | inboxId | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) |
int? | page | Optional page index in email list pagination (optional, default to 0) |
int? | size | Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
bool? | unreadOnly | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) |
string | searchFilter | Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body (optional) |
DateTime? | since | Optional filter emails received after given date time (optional) |
DateTime? | before | Optional filter emails received before given date time (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<PageEmailProjection> | Task of PageEmailProjection |
Remarks
By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailsOffsetPaginatedWithHttpInfoAsync(List<Guid>, int?, int?, string, bool?, string, DateTime?, DateTime?, int, CancellationToken)
Get all emails in all inboxes in paginated form. Email API list all.
Declaration
Task<ApiResponse<PageEmailProjection>> GetEmailsOffsetPaginatedWithHttpInfoAsync(List<Guid> inboxId = null, int? page = null, int? size = null, string sort = null, bool? unreadOnly = null, string searchFilter = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T><System.Guid> | inboxId | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) |
int? | page | Optional page index in email list pagination (optional, default to 0) |
int? | size | Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
bool? | unreadOnly | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) |
string | searchFilter | Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body (optional) |
DateTime? | since | Optional filter emails received after given date time (optional) |
DateTime? | before | Optional filter emails received before given date time (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<PageEmailProjection>> | Task of ApiResponse (PageEmailProjection) |
Remarks
By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailsPaginatedAsync(List<Guid>, int?, int?, string, bool?, string, DateTime?, DateTime?, int, CancellationToken)
Get all emails in all inboxes in paginated form. Email API list all.
Declaration
Task<PageEmailProjection> GetEmailsPaginatedAsync(List<Guid> inboxId = null, int? page = null, int? size = null, string sort = null, bool? unreadOnly = null, string searchFilter = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T><System.Guid> | inboxId | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) |
int? | page | Optional page index in email list pagination (optional, default to 0) |
int? | size | Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
bool? | unreadOnly | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) |
string | searchFilter | Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body (optional) |
DateTime? | since | Optional filter emails received after given date time. If unset will use time 24hours prior to now. (optional) |
DateTime? | before | Optional filter emails received before given date time (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<PageEmailProjection> | Task of PageEmailProjection |
Remarks
By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailsPaginatedWithHttpInfoAsync(List<Guid>, int?, int?, string, bool?, string, DateTime?, DateTime?, int, CancellationToken)
Get all emails in all inboxes in paginated form. Email API list all.
Declaration
Task<ApiResponse<PageEmailProjection>> GetEmailsPaginatedWithHttpInfoAsync(List<Guid> inboxId = null, int? page = null, int? size = null, string sort = null, bool? unreadOnly = null, string searchFilter = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T><System.Guid> | inboxId | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) |
int? | page | Optional page index in email list pagination (optional, default to 0) |
int? | size | Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
bool? | unreadOnly | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) |
string | searchFilter | Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body (optional) |
DateTime? | since | Optional filter emails received after given date time. If unset will use time 24hours prior to now. (optional) |
DateTime? | before | Optional filter emails received before given date time (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<PageEmailProjection>> | Task of ApiResponse (PageEmailProjection) |
Remarks
By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailTextLinesAsync(Guid, bool?, string, int, CancellationToken)
Parse and return text from an email, stripping HTML and decoding encoded characters
Declaration
Task<EmailTextLinesResult> GetEmailTextLinesAsync(Guid emailId, bool? decodeHtmlEntities = null, string lineSeparator = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email to fetch text for |
bool? | decodeHtmlEntities | Decode HTML entities (optional) |
string | lineSeparator | Line separator character (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<EmailTextLinesResult> | Task of EmailTextLinesResult |
Remarks
Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailTextLinesWithHttpInfoAsync(Guid, bool?, string, int, CancellationToken)
Parse and return text from an email, stripping HTML and decoding encoded characters
Declaration
Task<ApiResponse<EmailTextLinesResult>> GetEmailTextLinesWithHttpInfoAsync(Guid emailId, bool? decodeHtmlEntities = null, string lineSeparator = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email to fetch text for |
bool? | decodeHtmlEntities | Decode HTML entities (optional) |
string | lineSeparator | Line separator character (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<EmailTextLinesResult>> | Task of ApiResponse (EmailTextLinesResult) |
Remarks
Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailWithHttpInfoAsync(Guid, bool?, int, CancellationToken)
Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController.
Declaration
Task<ApiResponse<Email>> GetEmailWithHttpInfoAsync(Guid emailId, bool? decode = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
bool? | decode | Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<Email>> | Task of ApiResponse (Email) |
Remarks
Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetGravatarUrlForEmailAddressAsync(string, string, int, CancellationToken)
Declaration
Task<GravatarUrl> GetGravatarUrlForEmailAddressAsync(string emailAddress, string size = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | emailAddress | |
string | size | (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<GravatarUrl> | Task of GravatarUrl |
Remarks
Get gravatar url for email address
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetGravatarUrlForEmailAddressWithHttpInfoAsync(string, string, int, CancellationToken)
Declaration
Task<ApiResponse<GravatarUrl>> GetGravatarUrlForEmailAddressWithHttpInfoAsync(string emailAddress, string size = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | emailAddress | |
string | size | (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<GravatarUrl>> | Task of ApiResponse (GravatarUrl) |
Remarks
Get gravatar url for email address
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetLatestEmailAsync(List<Guid>, int, CancellationToken)
Get latest email in all inboxes. Most recently received.
Declaration
Task<Email> GetLatestEmailAsync(List<Guid> inboxIds = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T><System.Guid> | inboxIds | Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<Email> | Task of Email |
Remarks
Get the newest email in all inboxes or in a passed set of inbox IDs
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetLatestEmailInInbox1Async(Guid, int, CancellationToken)
Get latest email in an inbox. Use WaitForController
to get emails that may not have arrived yet.
Declaration
Task<Email> GetLatestEmailInInbox1Async(Guid inboxId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | inboxId | ID of the inbox you want to get the latest email from |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<Email> | Task of Email |
Remarks
Get the newest email in all inboxes or in a passed set of inbox IDs
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetLatestEmailInInbox1WithHttpInfoAsync(Guid, int, CancellationToken)
Get latest email in an inbox. Use WaitForController
to get emails that may not have arrived yet.
Declaration
Task<ApiResponse<Email>> GetLatestEmailInInbox1WithHttpInfoAsync(Guid inboxId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | inboxId | ID of the inbox you want to get the latest email from |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<Email>> | Task of ApiResponse (Email) |
Remarks
Get the newest email in all inboxes or in a passed set of inbox IDs
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetLatestEmailWithHttpInfoAsync(List<Guid>, int, CancellationToken)
Get latest email in all inboxes. Most recently received.
Declaration
Task<ApiResponse<Email>> GetLatestEmailWithHttpInfoAsync(List<Guid> inboxIds = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T><System.Guid> | inboxIds | Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<Email>> | Task of ApiResponse (Email) |
Remarks
Get the newest email in all inboxes or in a passed set of inbox IDs
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetOrganizationEmailsPaginatedAsync(List<Guid>, int?, int?, string, bool?, string, DateTime?, DateTime?, int, CancellationToken)
Get all organization emails. List team or shared test email accounts
Declaration
Task<PageEmailProjection> GetOrganizationEmailsPaginatedAsync(List<Guid> inboxId = null, int? page = null, int? size = null, string sort = null, bool? unreadOnly = null, string searchFilter = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T><System.Guid> | inboxId | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) |
int? | page | Optional page index in email list pagination (optional, default to 0) |
int? | size | Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
bool? | unreadOnly | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) |
string | searchFilter | Optional search filter search filter for emails. (optional) |
DateTime? | since | Optional filter emails received after given date time. If unset will use time 24hours prior to now. (optional) |
DateTime? | before | Optional filter emails received before given date time (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<PageEmailProjection> | Task of PageEmailProjection |
Remarks
By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetOrganizationEmailsPaginatedWithHttpInfoAsync(List<Guid>, int?, int?, string, bool?, string, DateTime?, DateTime?, int, CancellationToken)
Get all organization emails. List team or shared test email accounts
Declaration
Task<ApiResponse<PageEmailProjection>> GetOrganizationEmailsPaginatedWithHttpInfoAsync(List<Guid> inboxId = null, int? page = null, int? size = null, string sort = null, bool? unreadOnly = null, string searchFilter = null, DateTime? since = null, DateTime? before = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T><System.Guid> | inboxId | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) |
int? | page | Optional page index in email list pagination (optional, default to 0) |
int? | size | Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional, default to 20) |
string | sort | Optional createdAt sort direction ASC or DESC (optional, default to ASC) |
bool? | unreadOnly | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional, default to false) |
string | searchFilter | Optional search filter search filter for emails. (optional) |
DateTime? | since | Optional filter emails received after given date time. If unset will use time 24hours prior to now. (optional) |
DateTime? | before | Optional filter emails received before given date time (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<PageEmailProjection>> | Task of ApiResponse (PageEmailProjection) |
Remarks
By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetRawEmailContentsAsync(Guid, int, CancellationToken)
Get raw email string. Returns unparsed raw SMTP message with headers and body.
Declaration
Task GetRawEmailContentsAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task | Task of void |
Remarks
Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetRawEmailContentsWithHttpInfoAsync(Guid, int, CancellationToken)
Get raw email string. Returns unparsed raw SMTP message with headers and body.
Declaration
Task<ApiResponse<object>> GetRawEmailContentsWithHttpInfoAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<object>> | Task of ApiResponse |
Remarks
Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetRawEmailJsonAsync(Guid, int, CancellationToken)
Get raw email in JSON. Unparsed SMTP message in JSON wrapper format.
Declaration
Task<RawEmailJson> GetRawEmailJsonAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<RawEmailJson> | Task of RawEmailJson |
Remarks
Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetRawEmailJsonWithHttpInfoAsync(Guid, int, CancellationToken)
Get raw email in JSON. Unparsed SMTP message in JSON wrapper format.
Declaration
Task<ApiResponse<RawEmailJson>> GetRawEmailJsonWithHttpInfoAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<RawEmailJson>> | Task of ApiResponse (RawEmailJson) |
Remarks
Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetUnreadEmailCountAsync(Guid?, int, CancellationToken)
Get unread email count
Declaration
Task<UnreadCount> GetUnreadEmailCountAsync(Guid? inboxId = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid? | inboxId | Optional inbox ID filter (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<UnreadCount> | Task of UnreadCount |
Remarks
Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetUnreadEmailCountWithHttpInfoAsync(Guid?, int, CancellationToken)
Get unread email count
Declaration
Task<ApiResponse<UnreadCount>> GetUnreadEmailCountWithHttpInfoAsync(Guid? inboxId = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid? | inboxId | Optional inbox ID filter (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<UnreadCount>> | Task of ApiResponse (UnreadCount) |
Remarks
Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
MarkAllAsReadAsync(bool?, Guid?, int, CancellationToken)
Mark all emails as read or unread
Declaration
Task MarkAllAsReadAsync(bool? read = null, Guid? inboxId = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
bool? | read | What value to assign to email read property. Default true. (optional, default to true) |
System.Guid? | inboxId | Optional inbox ID filter (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task | Task of void |
Remarks
Marks all emails as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
MarkAllAsReadWithHttpInfoAsync(bool?, Guid?, int, CancellationToken)
Mark all emails as read or unread
Declaration
Task<ApiResponse<object>> MarkAllAsReadWithHttpInfoAsync(bool? read = null, Guid? inboxId = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
bool? | read | What value to assign to email read property. Default true. (optional, default to true) |
System.Guid? | inboxId | Optional inbox ID filter (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<object>> | Task of ApiResponse |
Remarks
Marks all emails as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
MarkAsReadAsync(Guid, bool?, int, CancellationToken)
Mark an email as read or unread
Declaration
Task<EmailPreview> MarkAsReadAsync(Guid emailId, bool? read = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
bool? | read | What value to assign to email read property. Default true. (optional, default to true) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<EmailPreview> | Task of EmailPreview |
Remarks
Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
MarkAsReadWithHttpInfoAsync(Guid, bool?, int, CancellationToken)
Mark an email as read or unread
Declaration
Task<ApiResponse<EmailPreview>> MarkAsReadWithHttpInfoAsync(Guid emailId, bool? read = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | |
bool? | read | What value to assign to email read property. Default true. (optional, default to true) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<EmailPreview>> | Task of ApiResponse (EmailPreview) |
Remarks
Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
ReplyToEmailAsync(Guid, ReplyToEmailOptions, int, CancellationToken)
Reply to an email
Declaration
Task<SentEmailDto> ReplyToEmailAsync(Guid emailId, ReplyToEmailOptions replyToEmailOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of the email that should be replied to |
ReplyToEmailOptions | replyToEmailOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<SentEmailDto> | Task of SentEmailDto |
Remarks
Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails to
, cc
, and bcc
.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
ReplyToEmailWithHttpInfoAsync(Guid, ReplyToEmailOptions, int, CancellationToken)
Reply to an email
Declaration
Task<ApiResponse<SentEmailDto>> ReplyToEmailWithHttpInfoAsync(Guid emailId, ReplyToEmailOptions replyToEmailOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of the email that should be replied to |
ReplyToEmailOptions | replyToEmailOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<SentEmailDto>> | Task of ApiResponse (SentEmailDto) |
Remarks
Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails to
, cc
, and bcc
.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
SearchEmailsAsync(SearchEmailsOptions, int, CancellationToken)
Get all emails by search criteria. Return in paginated form.
Declaration
Task<PageEmailProjection> SearchEmailsAsync(SearchEmailsOptions searchEmailsOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
SearchEmailsOptions | searchEmailsOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<PageEmailProjection> | Task of PageEmailProjection |
Remarks
Search emails by given criteria return matches in paginated format. Searches against email recipients, sender, subject, email address and ID. Does not search email body
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
SearchEmailsWithHttpInfoAsync(SearchEmailsOptions, int, CancellationToken)
Get all emails by search criteria. Return in paginated form.
Declaration
Task<ApiResponse<PageEmailProjection>> SearchEmailsWithHttpInfoAsync(SearchEmailsOptions searchEmailsOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
SearchEmailsOptions | searchEmailsOptions | |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<PageEmailProjection>> | Task of ApiResponse (PageEmailProjection) |
Remarks
Search emails by given criteria return matches in paginated format. Searches against email recipients, sender, subject, email address and ID. Does not search email body
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
SendEmailSourceOptionalAsync(SendEmailOptions, Guid?, bool?, bool?, int, CancellationToken)
Send email
Declaration
Task SendEmailSourceOptionalAsync(SendEmailOptions sendEmailOptions, Guid? inboxId = null, bool? useDomainPool = null, bool? virtualSend = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
SendEmailOptions | sendEmailOptions | |
System.Guid? | inboxId | ID of the inbox you want to send the email from (optional) |
bool? | useDomainPool | Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. (optional) |
bool? | virtualSend | Optionally create inbox to send from that is a virtual inbox and won't send to external addresses (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task | Task of void |
Remarks
Alias for InboxController.sendEmail
method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
SendEmailSourceOptionalWithHttpInfoAsync(SendEmailOptions, Guid?, bool?, bool?, int, CancellationToken)
Send email
Declaration
Task<ApiResponse<object>> SendEmailSourceOptionalWithHttpInfoAsync(SendEmailOptions sendEmailOptions, Guid? inboxId = null, bool? useDomainPool = null, bool? virtualSend = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
SendEmailOptions | sendEmailOptions | |
System.Guid? | inboxId | ID of the inbox you want to send the email from (optional) |
bool? | useDomainPool | Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. (optional) |
bool? | virtualSend | Optionally create inbox to send from that is a virtual inbox and won't send to external addresses (optional) |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<object>> | Task of ApiResponse |
Remarks
Alias for InboxController.sendEmail
method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
ValidateEmailAsync(Guid, int, CancellationToken)
Validate email HTML contents
Declaration
Task<ValidationDto> ValidateEmailAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ValidationDto> | Task of ValidationDto |
Remarks
Validate the HTML content of email if HTML is found. Considered valid if no HTML is present.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
ValidateEmailWithHttpInfoAsync(Guid, int, CancellationToken)
Validate email HTML contents
Declaration
Task<ApiResponse<ValidationDto>> ValidateEmailWithHttpInfoAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | emailId | ID of email |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<ApiResponse<ValidationDto>> | Task of ApiResponse (ValidationDto) |
Remarks
Validate the HTML content of email if HTML is found. Considered valid if no HTML is present.
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |