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

Inbox createNewEmailAddress(allowTeamAccess, expiresAt, expiresIn, useDomainPool)

Create new random inbox

Returns an Inbox with an id and an emailAddress

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = CommonActionsControllerApi()
val allowTeamAccess : kotlin.Boolean = true // kotlin.Boolean | allowTeamAccess
val expiresAt : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | expiresAt
val expiresIn : kotlin.Long = 789 // kotlin.Long | expiresIn
val useDomainPool : kotlin.Boolean = true // kotlin.Boolean | useDomainPool
try {
    val result : Inbox = apiInstance.createNewEmailAddress(allowTeamAccess, expiresAt, expiresIn, useDomainPool)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling CommonActionsControllerApi#createNewEmailAddress")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling CommonActionsControllerApi#createNewEmailAddress")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
allowTeamAccesskotlin.BooleanallowTeamAccess[optional]
expiresAtjava.time.OffsetDateTimeexpiresAt[optional]
expiresInkotlin.LongexpiresIn[optional]
useDomainPoolkotlin.BooleanuseDomainPool[optional]

Return type

Inbox

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

createNewEmailAddress1

Inbox createNewEmailAddress1(allowTeamAccess, expiresAt, expiresIn, useDomainPool)

Create new random inbox

Returns an Inbox with an id and an emailAddress

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = CommonActionsControllerApi()
val allowTeamAccess : kotlin.Boolean = true // kotlin.Boolean | allowTeamAccess
val expiresAt : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime | expiresAt
val expiresIn : kotlin.Long = 789 // kotlin.Long | expiresIn
val useDomainPool : kotlin.Boolean = true // kotlin.Boolean | useDomainPool
try {
    val result : Inbox = apiInstance.createNewEmailAddress1(allowTeamAccess, expiresAt, expiresIn, useDomainPool)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling CommonActionsControllerApi#createNewEmailAddress1")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling CommonActionsControllerApi#createNewEmailAddress1")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
allowTeamAccesskotlin.BooleanallowTeamAccess[optional]
expiresAtjava.time.OffsetDateTimeexpiresAt[optional]
expiresInkotlin.LongexpiresIn[optional]
useDomainPoolkotlin.BooleanuseDomainPool[optional]

Return type

Inbox

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

emptyInbox

emptyInbox(inboxId)

Delete all emails in an inbox

Deletes all emails

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = CommonActionsControllerApi()
val inboxId : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID | inboxId
try {
    apiInstance.emptyInbox(inboxId)
} catch (e: ClientException) {
    println("4xx response calling CommonActionsControllerApi#emptyInbox")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling CommonActionsControllerApi#emptyInbox")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
inboxIdjava.util.UUIDinboxId

Return type

null (empty response body)

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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

sendEmailSimple

sendEmailSimple(emailOptions)

Send an email

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

Example

// Import classes:
//import com.mailslurp.infrastructure.*
//import com.mailslurp.models.*

val apiInstance = CommonActionsControllerApi()
val emailOptions : SimpleSendEmailOptions =  // SimpleSendEmailOptions | emailOptions
try {
    apiInstance.sendEmailSimple(emailOptions)
} catch (e: ClientException) {
    println("4xx response calling CommonActionsControllerApi#sendEmailSimple")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling CommonActionsControllerApi#sendEmailSimple")
    e.printStackTrace()
}

Parameters

NameTypeDescriptionNotes
emailOptionsSimpleSendEmailOptionsemailOptions

Return type

null (empty response body)

Authorization

Configure API_KEY: ApiClient.apiKey[“x-api-key”] = "" ApiClient.apiKeyPrefix[“x-api-key”] = ""

HTTP request headers

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