# CommonActionsControllerAPI

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

Method HTTP request Description
createNewEmailAddress POST /createInbox Create new random inbox
createNewEmailAddress1 POST /newEmailAddress Create new random inbox
emptyInbox DELETE /emptyInbox Delete all emails in an inbox
sendEmailSimple POST /sendEmail Send an email

# createNewEmailAddress

    open class func createNewEmailAddress(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
// Create new random inbox
CommonActionsControllerAPI.createNewEmailAddress() { (response, error) in
    guard error == nil else {
        print(error)
        return
    }
    if (response) {
        dump(response)
    }
}

# Parameters

This endpoint does not need any parameter.

# 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 README]

# createNewEmailAddress1

    open class func createNewEmailAddress1(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
// Create new random inbox
CommonActionsControllerAPI.createNewEmailAddress1() { (response, error) in
    guard error == nil else {
        print(error)
        return
    }
    if (response) {
        dump(response)
    }
}

# Parameters

This endpoint does not need any parameter.

# 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 README]

# 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

Name Type Description Notes
inboxId UUID inboxId

# 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 README]

# 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

Name Type Description Notes
emailOptions SimpleSendEmailOptions emailOptions

# 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 README]