Class EmailControllerApi

Hierarchy

Constructors

Properties

Methods

applyImapFlagOperation applyImapFlagOperationRaw canSend canSendRaw checkEmailBody checkEmailBodyFeatureSupport checkEmailBodyFeatureSupportRaw checkEmailBodyRaw checkEmailClientSupport checkEmailClientSupportRaw deleteAllEmails deleteAllEmailsRaw deleteEmail deleteEmailRaw downloadAttachment downloadAttachmentBase64 downloadAttachmentBase64Raw downloadAttachmentRaw downloadBody downloadBodyBytes downloadBodyBytesRaw downloadBodyRaw forwardEmail forwardEmailRaw getAttachmentMetaData getAttachmentMetaDataRaw getEmail getEmailAttachments getEmailAttachmentsRaw getEmailContentMatch getEmailContentMatchRaw getEmailContentPart getEmailContentPartRaw getEmailCount getEmailCountRaw getEmailHTML getEmailHTMLJson getEmailHTMLJsonRaw getEmailHTMLQuery getEmailHTMLQueryRaw getEmailHTMLRaw getEmailLinks getEmailLinksRaw getEmailPreviewURLs getEmailPreviewURLsRaw getEmailRaw getEmailScreenshotAsBase64 getEmailScreenshotAsBase64Raw getEmailScreenshotAsBinary getEmailScreenshotAsBinaryRaw getEmailTextLines getEmailTextLinesRaw getEmailsOffsetPaginated getEmailsOffsetPaginatedRaw getEmailsPaginated getEmailsPaginatedRaw getGravatarUrlForEmailAddress getGravatarUrlForEmailAddressRaw getLatestEmail getLatestEmailInInbox1 getLatestEmailInInbox1Raw getLatestEmailRaw getOrganizationEmailsPaginated getOrganizationEmailsPaginatedRaw getRawEmailContents getRawEmailContentsRaw getRawEmailJson getRawEmailJsonRaw getUnreadEmailCount getUnreadEmailCountRaw markAllAsRead markAllAsReadRaw markAsRead markAsReadRaw replyToEmail replyToEmailRaw request searchEmails searchEmailsRaw sendEmailSourceOptional sendEmailSourceOptionalRaw validateEmail validateEmailRaw withMiddleware withPostMiddleware withPreMiddleware

Constructors

Properties

configuration: Configuration = ...

Methods

  • 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. Detect broken links, spelling, and images in email content

    Parameters

    Returns Promise<CheckEmailBodyResults>

  • 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. Detect broken links, spelling, and images in email content

    Parameters

    Returns Promise<ApiResponse<CheckEmailBodyResults>>

  • Deletes all emails in your account. Be careful as emails cannot be recovered Delete all emails in all inboxes.

    Parameters

    • Optional initOverrides: RequestInit

    Returns Promise<void>

  • Deletes all emails in your account. Be careful as emails cannot be recovered Delete all emails in all inboxes.

    Parameters

    • Optional initOverrides: RequestInit

    Returns Promise<ApiResponse<void>>

  • Deletes an email and removes it from the inbox. Deleted emails cannot be recovered. Delete an email

    Parameters

    Returns Promise<void>

  • 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. 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.

    Parameters

    Returns Promise<string>

  • 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. 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.

    Parameters

    Returns Promise<DownloadAttachmentDto>

  • 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. 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.

    Parameters

    Returns Promise<ApiResponse<DownloadAttachmentDto>>

  • 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. 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.

    Parameters

    Returns Promise<ApiResponse<string>>

  • Returns the specified email body for a given email as a string Get email body as string. Returned as plain/text with content type header.

    Parameters

    Returns Promise<string>

  • Returns the specified email body for a given email as a stream / array of bytes. Get email body in bytes. Returned as octet-stream with content type header.

    Parameters

    Returns Promise<string>

  • Returns the specified email body for a given email as a string Get email body as string. Returned as plain/text with content type header.

    Parameters

    Returns Promise<ApiResponse<string>>

  • 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. Forward email to recipients

    Parameters

    Returns Promise<SentEmailDto>

  • 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. Forward email to recipients

    Parameters

    Returns Promise<ApiResponse<SentEmailDto>>

  • Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController.

    Parameters

    Returns Promise<Email>

  • Get email count

    Parameters

    • Optional initOverrides: RequestInit

    Returns Promise<CountDto>

  • 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. Get email content as HTML. For displaying emails in browser context.

    Parameters

    Returns Promise<string>

  • 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. Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content

    Parameters

    Returns Promise<EmailHtmlDto>

  • 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. Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content

    Parameters

    Returns Promise<ApiResponse<EmailHtmlDto>>

  • 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. Get email content as HTML. For displaying emails in browser context.

    Parameters

    Returns Promise<ApiResponse<string>>

  • Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController.

    Parameters

    Returns Promise<ApiResponse<Email>>

  • 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 Get all emails in all inboxes in paginated form. Email API list all.

    Parameters

    Returns Promise<PageEmailProjection>

  • Get the newest email in all inboxes or in a passed set of inbox IDs Get latest email in all inboxes. Most recently received.

    Parameters

    Returns Promise<Email>

  • 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 Get raw email string. Returns unparsed raw SMTP message with headers and body.

    Parameters

    Returns Promise<void>

  • 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 Get raw email string. Returns unparsed raw SMTP message with headers and body.

    Parameters

    Returns Promise<ApiResponse<void>>

  • Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response Get raw email in JSON. Unparsed SMTP message in JSON wrapper format.

    Parameters

    Returns Promise<RawEmailJson>

  • 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 Mark all emails as read or unread

    Parameters

    Returns Promise<void>

  • 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 Mark all emails as read or unread

    Parameters

    Returns Promise<ApiResponse<void>>

  • 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 Mark an email as read or unread

    Parameters

    Returns Promise<EmailPreview>

  • 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. Reply to an email

    Parameters

    Returns Promise<SentEmailDto>

  • 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 Get all emails by search criteria. Return in paginated form.

    Parameters

    Returns Promise<PageEmailProjection>

  • 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. Send email

    Parameters

    Returns Promise<void>

  • 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. Send email

    Parameters

    Returns Promise<ApiResponse<void>>