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, expiresAt: Date? = nil, expiresIn: Int64? = nil, useDomainPool: Bool? = nil, completion: @escaping (_ data: Inbox?, _ error: Error?) -> Void)

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 expiresAt = Date() // Date | expiresAt (optional)
let expiresIn = 987 // Int64 | expiresIn (optional)
let useDomainPool = true // Bool | useDomainPool (optional)

// Create new random inbox
CommonActionsControllerAPI.createNewEmailAddress(allowTeamAccess: allowTeamAccess, expiresAt: expiresAt, expiresIn: expiresIn, useDomainPool: useDomainPool) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

NameTypeDescriptionNotes
allowTeamAccessBoolallowTeamAccess[optional]
expiresAtDateexpiresAt[optional]
expiresInInt64expiresIn[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, expiresAt: Date? = nil, expiresIn: Int64? = nil, useDomainPool: Bool? = nil, completion: @escaping (_ data: Inbox?, _ error: Error?) -> Void)

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 expiresAt = Date() // Date | expiresAt (optional)
let expiresIn = 987 // Int64 | expiresIn (optional)
let useDomainPool = true // Bool | useDomainPool (optional)

// Create new random inbox
CommonActionsControllerAPI.createNewEmailAddress1(allowTeamAccess: allowTeamAccess, expiresAt: expiresAt, expiresIn: expiresIn, useDomainPool: useDomainPool) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

NameTypeDescriptionNotes
allowTeamAccessBoolallowTeamAccess[optional]
expiresAtDateexpiresAt[optional]
expiresInInt64expiresIn[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, completion: @escaping (_ data: Void?, _ error: Error?) -> 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) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

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, completion: @escaping (_ data: Void?, _ error: Error?) -> 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) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

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 ]