CommonActionsControllerAPI

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

MethodHTTP requestDescription
createNewEmailAddressPOST /createInboxCreate new random inbox
createNewEmailAddress1POST /newEmailAddressCreate new random inbox
emptyInboxDELETE /emptyInboxDelete all emails in an inbox
sendEmailSimplePOST /sendEmailSend an email

createNewEmailAddress

    open class func createNewEmailAddress( allowTeamAccess: Bool? = nil,  _description: String? = nil,  emailAddress: String? = nil,  expiresAt: Date? = nil,  expiresIn: Int64? = nil,  favourite: Bool? = nil,  inboxType: InboxType_createNewEmailAddress? = nil,  name: String? = nil,  tags: [String]? = nil,  useDomainPool: Bool? = nil) -> Promise<Inbox>

Create new random inbox

Returns an Inbox with an id and an emailAddress

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 allowTeamAccess = true // Bool | allowTeamAccess (optional)
let _description = "_description_example" // String | description (optional)
let emailAddress = "emailAddress_example" // String | emailAddress (optional)
let expiresAt = Date() // Date | expiresAt (optional)
let expiresIn = 987 // Int64 | expiresIn (optional)
let favourite = true // Bool | favourite (optional)
let inboxType = "inboxType_example" // String | inboxType (optional)
let name = "name_example" // String | name (optional)
let tags = ["inner_example"] // [String] | tags (optional)
let useDomainPool = true // Bool | useDomainPool (optional)

// Create new random inbox
CommonActionsControllerAPI.createNewEmailAddress(allowTeamAccess: allowTeamAccess, _description: _description, emailAddress: emailAddress, expiresAt: expiresAt, expiresIn: expiresIn, favourite: favourite, inboxType: inboxType, name: name, tags: tags, useDomainPool: useDomainPool).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

NameTypeDescriptionNotes
allowTeamAccessBoolallowTeamAccess[optional]
_descriptionStringdescription[optional]
emailAddressStringemailAddress[optional]
expiresAtDateexpiresAt[optional]
expiresInInt64expiresIn[optional]
favouriteBoolfavourite[optional]
inboxTypeStringinboxType[optional]
nameStringname[optional]
tags**[String]**tags[optional]
useDomainPoolBooluseDomainPool[optional]

Return type

Inbox

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

createNewEmailAddress1

    open class func createNewEmailAddress1( allowTeamAccess: Bool? = nil,  _description: String? = nil,  emailAddress: String? = nil,  expiresAt: Date? = nil,  expiresIn: Int64? = nil,  favourite: Bool? = nil,  inboxType: InboxType_createNewEmailAddress1? = nil,  name: String? = nil,  tags: [String]? = nil,  useDomainPool: Bool? = nil) -> Promise<Inbox>

Create new random inbox

Returns an Inbox with an id and an emailAddress

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 allowTeamAccess = true // Bool | allowTeamAccess (optional)
let _description = "_description_example" // String | description (optional)
let emailAddress = "emailAddress_example" // String | emailAddress (optional)
let expiresAt = Date() // Date | expiresAt (optional)
let expiresIn = 987 // Int64 | expiresIn (optional)
let favourite = true // Bool | favourite (optional)
let inboxType = "inboxType_example" // String | inboxType (optional)
let name = "name_example" // String | name (optional)
let tags = ["inner_example"] // [String] | tags (optional)
let useDomainPool = true // Bool | useDomainPool (optional)

// Create new random inbox
CommonActionsControllerAPI.createNewEmailAddress1(allowTeamAccess: allowTeamAccess, _description: _description, emailAddress: emailAddress, expiresAt: expiresAt, expiresIn: expiresIn, favourite: favourite, inboxType: inboxType, name: name, tags: tags, useDomainPool: useDomainPool).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

NameTypeDescriptionNotes
allowTeamAccessBoolallowTeamAccess[optional]
_descriptionStringdescription[optional]
emailAddressStringemailAddress[optional]
expiresAtDateexpiresAt[optional]
expiresInInt64expiresIn[optional]
favouriteBoolfavourite[optional]
inboxTypeStringinboxType[optional]
nameStringname[optional]
tags**[String]**tags[optional]
useDomainPoolBooluseDomainPool[optional]

Return type

Inbox

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

emptyInbox

    open class func emptyInbox( inboxId: UUID) -> Promise<Void>

Delete all emails in an inbox

Deletes all emails

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 | inboxId

// Delete all emails in an inbox
CommonActionsControllerAPI.emptyInbox(inboxId: inboxId).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

NameTypeDescriptionNotes
inboxIdUUIDinboxId

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 ]

sendEmailSimple

    open class func sendEmailSimple( emailOptions: SimpleSendEmailOptions) -> Promise<Void>

Send an email

If no senderId or inboxId provided a random email address will be used to send from.

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 emailOptions = SimpleSendEmailOptions(body: "body_example", senderId: 123, subject: "subject_example", to: "to_example") // SimpleSendEmailOptions | emailOptions

// Send an email
CommonActionsControllerAPI.sendEmailSimple(emailOptions: emailOptions).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

NameTypeDescriptionNotes
emailOptionsSimpleSendEmailOptionsemailOptions

Return type

Void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

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