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 |
---|---|---|
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 |
---|---|---|
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 |
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
Guid | emailId | ID of email |
int | operationIndex | Index associated with the operation. |
CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Task<List<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 |
---|---|---|
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<List<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 |
---|---|---|
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 |
---|---|---|
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 |
GetEmailCountAsync(int, CancellationToken)
Get email count
Declaration
Task<CountDto> GetEmailCountAsync(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<CountDto> | Task of CountDto |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailCountWithHttpInfoAsync(int, CancellationToken)
Get email count
Declaration
Task<ApiResponse<CountDto>> GetEmailCountWithHttpInfoAsync(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<CountDto>> | Task of ApiResponse (CountDto) |
Exceptions
Type | Condition |
---|---|
ApiException | Thrown when fails to make API call |
GetEmailHTMLAsync(Guid, bool?, int, CancellationToken)
Get email content as HTML. For displaying emails in browser context.
Declaration
Task<string> GetEmailHTMLAsync(Guid emailId, bool? decode = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Guid | emailId | |
bool? | decode | (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?, 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, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Guid | emailId | |
bool? | decode | (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?, 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, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Guid | emailId | |
bool? | decode | (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 |
---|---|---|
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 |
---|---|---|
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?, int, CancellationToken)
Get email content as HTML. For displaying emails in browser context.
Declaration
Task<ApiResponse<string>> GetEmailHTMLWithHttpInfoAsync(Guid emailId, bool? decode = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Guid | emailId | |
bool? | decode | (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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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 |
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 |
---|---|---|
List<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 |
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 |
---|---|---|
List<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 |
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
List<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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
List<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 |
---|---|---|
List<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 (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 |
---|---|---|
List<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 (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<string> GetRawEmailContentsAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
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 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<string>> GetRawEmailContentsWithHttpInfoAsync(Guid emailId, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
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 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 |
---|---|---|
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 |
---|---|---|
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(int, CancellationToken)
Get unread email count
Declaration
Task<UnreadCount> GetUnreadEmailCountAsync(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<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(int, CancellationToken)
Get unread email count
Declaration
Task<ApiResponse<UnreadCount>> GetUnreadEmailCountWithHttpInfoAsync(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<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 |
MarkAsReadAsync(Guid, bool?, int, CancellationToken)
Mark an email as read on unread
Declaration
Task<EmailPreview> MarkAsReadAsync(Guid emailId, bool? read = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
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 on unread
Declaration
Task<ApiResponse<EmailPreview>> MarkAsReadWithHttpInfoAsync(Guid emailId, bool? read = null, int operationIndex = 0, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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 |
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 | |
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 | |
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 |
---|---|---|
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 |
---|---|---|
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 |