Skip to content

SentEmailsControllerAPI

All URIs are relative to https://api.mailslurp.com

Method HTTP request Description
deleteAllSentEmails DELETE /sent Delete all sent email receipts
deleteSentEmail DELETE /sent/{id} Delete sent email receipt
getAllSentTrackingPixels GET /sent/tracking-pixels
getRawSentEmailContents GET /sent/{emailId}/raw Get raw sent email string. Returns unparsed raw SMTP message with headers and body.
getRawSentEmailJson GET /sent/{emailId}/raw/json Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.
getSentEmail GET /sent/{id} Get sent email receipt
getSentEmailHTMLContent GET /sent/{id}/html Get sent email HTML content
getSentEmailPreviewURLs GET /sent/{id}/urls Get sent email URL for viewing in browser or downloading
getSentEmailTrackingPixels GET /sent/{id}/tracking-pixels
getSentEmails GET /sent Get all sent emails in paginated form
getSentOrganizationEmails GET /sent/organization
    open class func deleteAllSentEmails() -> Promise<Void>

Delete all sent email receipts

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp


// Delete all sent email receipts
SentEmailsControllerAPI.deleteAllSentEmails().then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

This endpoint does not need any parameter.

Return type

Void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to ]

    open class func deleteSentEmail( _id: UUID) -> Promise<Void>

Delete sent email receipt

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let _id = 987 // UUID | 

// Delete sent email receipt
SentEmailsControllerAPI.deleteSentEmail(_id: _id).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
_id UUID

Return type

Void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to ]

    open class func getAllSentTrackingPixels( page: Int? = nil,  size: Int? = nil,  sort: Sort_getAllSentTrackingPixels? = nil,  searchFilter: String? = nil,  since: Date? = nil,  before: Date? = nil) -> Promise<PageTrackingPixelProjection>

Get all sent email tracking pixels in paginated form

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let page = 987 // Int | Optional page  in sent email tracking pixel list pagination (optional) (default to 0)
let size = 987 // Int | Optional page size in sent email tracking pixel list pagination (optional) (default to 20)
let sort = "sort_example" // String | Optional createdAt sort direction ASC or DESC (optional) (default to .asc)
let searchFilter = "searchFilter_example" // String | Optional search filter (optional)
let since = Date() // Date | Filter by created at after the given timestamp (optional)
let before = Date() // Date | Filter by created at before the given timestamp (optional)

SentEmailsControllerAPI.getAllSentTrackingPixels(page: page, size: size, sort: sort, searchFilter: searchFilter, since: since, before: before).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
page Int Optional page in sent email tracking pixel list pagination [optional] [default to 0]
size Int Optional page size in sent email tracking pixel list pagination [optional] [default to 20]
sort String Optional createdAt sort direction ASC or DESC [optional] [default to .asc]
searchFilter String Optional search filter [optional]
since Date Filter by created at after the given timestamp [optional]
before Date Filter by created at before the given timestamp [optional]

Return type

PageTrackingPixelProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

    open class func getRawSentEmailContents( emailId: UUID) -> Promise<String>

Get raw sent email string. Returns unparsed raw SMTP message with headers and body.

Returns a raw, unparsed, and unprocessed sent 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 getRawSentEmailJson endpoint

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let emailId = 987 // UUID | ID of email

// Get raw sent email string. Returns unparsed raw SMTP message with headers and body.
SentEmailsControllerAPI.getRawSentEmailContents(emailId: emailId).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
emailId UUID ID of email

Return type

String

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

[Back to top] [Back to API list] [Back to Model list] [Back to ]

    open class func getRawSentEmailJson( emailId: UUID) -> Promise<RawEmailJson>

Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.

Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let emailId = 987 // UUID | ID of email

// Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.
SentEmailsControllerAPI.getRawSentEmailJson(emailId: emailId).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
emailId UUID ID of email

Return type

RawEmailJson

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

    open class func getSentEmail( _id: UUID) -> Promise<SentEmailDto>

Get sent email receipt

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let _id = 987 // UUID | 

// Get sent email receipt
SentEmailsControllerAPI.getSentEmail(_id: _id).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
_id UUID

Return type

SentEmailDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

    open class func getSentEmailHTMLContent( _id: UUID) -> Promise<String>

Get sent email HTML content

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let _id = 987 // UUID | 

// Get sent email HTML content
SentEmailsControllerAPI.getSentEmailHTMLContent(_id: _id).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
_id UUID

Return type

String

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/html

[Back to top] [Back to API list] [Back to Model list] [Back to ]

    open class func getSentEmailPreviewURLs( _id: UUID) -> Promise<EmailPreviewUrls>

Get sent email URL for viewing in browser or downloading

Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let _id = 987 // UUID | 

// Get sent email URL for viewing in browser or downloading
SentEmailsControllerAPI.getSentEmailPreviewURLs(_id: _id).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
_id UUID

Return type

EmailPreviewUrls

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

    open class func getSentEmailTrackingPixels( _id: UUID,  page: Int? = nil,  size: Int? = nil,  sort: Sort_getSentEmailTrackingPixels? = nil,  searchFilter: String? = nil,  since: Date? = nil,  before: Date? = nil) -> Promise<PageTrackingPixelProjection>

Get all tracking pixels for a sent email in paginated form

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let _id = 987 // UUID | 
let page = 987 // Int | Optional page  in sent email tracking pixel list pagination (optional) (default to 0)
let size = 987 // Int | Optional page size in sent email tracking pixel list pagination (optional) (default to 20)
let sort = "sort_example" // String | Optional createdAt sort direction ASC or DESC (optional) (default to .asc)
let searchFilter = "searchFilter_example" // String | Optional search filter (optional)
let since = Date() // Date | Filter by created at after the given timestamp (optional)
let before = Date() // Date | Filter by created at before the given timestamp (optional)

SentEmailsControllerAPI.getSentEmailTrackingPixels(_id: _id, page: page, size: size, sort: sort, searchFilter: searchFilter, since: since, before: before).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
_id UUID
page Int Optional page in sent email tracking pixel list pagination [optional] [default to 0]
size Int Optional page size in sent email tracking pixel list pagination [optional] [default to 20]
sort String Optional createdAt sort direction ASC or DESC [optional] [default to .asc]
searchFilter String Optional search filter [optional]
since Date Filter by created at after the given timestamp [optional]
before Date Filter by created at before the given timestamp [optional]

Return type

PageTrackingPixelProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

    open class func getSentEmails( inboxId: UUID? = nil,  page: Int? = nil,  size: Int? = nil,  sort: Sort_getSentEmails? = nil,  searchFilter: String? = nil,  since: Date? = nil,  before: Date? = nil) -> Promise<PageSentEmailProjection>

Get all sent emails in paginated form

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let inboxId = 987 // UUID | Optional inboxId to filter sender of sent emails by (optional)
let page = 987 // Int | Optional page  in inbox sent email list pagination (optional) (default to 0)
let size = 987 // Int | Optional page size in inbox sent email list pagination (optional) (default to 20)
let sort = "sort_example" // String | Optional createdAt sort direction ASC or DESC (optional) (default to .asc)
let searchFilter = "searchFilter_example" // String | Optional search filter (optional)
let since = Date() // Date | Filter by created at after the given timestamp (optional)
let before = Date() // Date | Filter by created at before the given timestamp (optional)

// Get all sent emails in paginated form
SentEmailsControllerAPI.getSentEmails(inboxId: inboxId, page: page, size: size, sort: sort, searchFilter: searchFilter, since: since, before: before).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
inboxId UUID Optional inboxId to filter sender of sent emails by [optional]
page Int Optional page in inbox sent email list pagination [optional] [default to 0]
size Int Optional page size in inbox sent email list pagination [optional] [default to 20]
sort String Optional createdAt sort direction ASC or DESC [optional] [default to .asc]
searchFilter String Optional search filter [optional]
since Date Filter by created at after the given timestamp [optional]
before Date Filter by created at before the given timestamp [optional]

Return type

PageSentEmailProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

    open class func getSentOrganizationEmails( inboxId: UUID? = nil,  page: Int? = nil,  size: Int? = nil,  sort: Sort_getSentOrganizationEmails? = nil,  searchFilter: String? = nil,  since: Date? = nil,  before: Date? = nil) -> Promise<PageSentEmailProjection>

Get all sent organization emails in paginated form

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import mailslurp

let inboxId = 987 // UUID | Optional inboxId to filter sender of sent emails by (optional)
let page = 987 // Int | Optional page  in sent email list pagination (optional) (default to 0)
let size = 987 // Int | Optional page size in sent email list pagination (optional) (default to 20)
let sort = "sort_example" // String | Optional createdAt sort direction ASC or DESC (optional) (default to .asc)
let searchFilter = "searchFilter_example" // String | Optional search filter (optional)
let since = Date() // Date | Filter by created at after the given timestamp (optional)
let before = Date() // Date | Filter by created at before the given timestamp (optional)

SentEmailsControllerAPI.getSentOrganizationEmails(inboxId: inboxId, page: page, size: size, sort: sort, searchFilter: searchFilter, since: since, before: before).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
inboxId UUID Optional inboxId to filter sender of sent emails by [optional]
page Int Optional page in sent email list pagination [optional] [default to 0]
size Int Optional page size in sent email list pagination [optional] [default to 20]
sort String Optional createdAt sort direction ASC or DESC [optional] [default to .asc]
searchFilter String Optional search filter [optional]
since Date Filter by created at after the given timestamp [optional]
before Date Filter by created at before the given timestamp [optional]

Return type

PageSentEmailProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]