CommonActionsControllerApi
All URIs are relative to https://api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
createNewEmailAddress | POST /newEmailAddress | Create new random inbox |
createRandomInbox | POST /createInbox | Create new random inbox |
deleteEmailAddress | DELETE /deleteEmailAddress | Delete inbox email address by inbox id |
emptyInbox | DELETE /emptyInbox | Delete all emails in an inbox |
sendEmailSimple | POST /sendEmail | Send an email |
InboxDto createNewEmailAddress(allowTeamAccess, useDomainPool, expiresAt, expiresIn, emailAddress, inboxType, description, name, tags, favourite, virtualInbox)
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 |
val useDomainPool : kotlin.Boolean = true // kotlin.Boolean |
val expiresAt : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime |
val expiresIn : kotlin.Long = 789 // kotlin.Long |
val emailAddress : kotlin.String = emailAddress_example // kotlin.String |
val inboxType : kotlin.String = inboxType_example // kotlin.String |
val description : kotlin.String = description_example // kotlin.String |
val name : kotlin.String = name_example // kotlin.String |
val tags : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
val favourite : kotlin.Boolean = true // kotlin.Boolean |
val virtualInbox : kotlin.Boolean = true // kotlin.Boolean |
try {
val result : InboxDto = apiInstance.createNewEmailAddress(allowTeamAccess, useDomainPool, expiresAt, expiresIn, emailAddress, inboxType, description, name, tags, favourite, virtualInbox)
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
Name | Type | Description | Notes |
---|---|---|---|
allowTeamAccess | kotlin.Boolean | [optional] | |
useDomainPool | kotlin.Boolean | [optional] | |
expiresAt | java.time.OffsetDateTime | [optional] | |
expiresIn | kotlin.Long | [optional] | |
emailAddress | kotlin.String | [optional] | |
inboxType | kotlin.String | [optional] [enum: HTTP_INBOX, SMTP_INBOX] | |
description | kotlin.String | [optional] | |
name | kotlin.String | [optional] | |
tags | kotlin.collections.List | [optional] | |
favourite | kotlin.Boolean | [optional] | |
virtualInbox | kotlin.Boolean | [optional] |
Return type
Authorization
Configure API_KEY: ApiClient.apiKey["x-api-key"] = "" ApiClient.apiKeyPrefix["x-api-key"] = ""
HTTP request headers
- Content-Type: Not defined
- Accept: /
InboxDto createRandomInbox(allowTeamAccess, useDomainPool, expiresAt, expiresIn, emailAddress, inboxType, description, name, tags, favourite, virtualInbox)
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 |
val useDomainPool : kotlin.Boolean = true // kotlin.Boolean |
val expiresAt : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime |
val expiresIn : kotlin.Long = 789 // kotlin.Long |
val emailAddress : kotlin.String = emailAddress_example // kotlin.String |
val inboxType : kotlin.String = inboxType_example // kotlin.String |
val description : kotlin.String = description_example // kotlin.String |
val name : kotlin.String = name_example // kotlin.String |
val tags : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
val favourite : kotlin.Boolean = true // kotlin.Boolean |
val virtualInbox : kotlin.Boolean = true // kotlin.Boolean |
try {
val result : InboxDto = apiInstance.createRandomInbox(allowTeamAccess, useDomainPool, expiresAt, expiresIn, emailAddress, inboxType, description, name, tags, favourite, virtualInbox)
println(result)
} catch (e: ClientException) {
println("4xx response calling CommonActionsControllerApi#createRandomInbox")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CommonActionsControllerApi#createRandomInbox")
e.printStackTrace()
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
allowTeamAccess | kotlin.Boolean | [optional] | |
useDomainPool | kotlin.Boolean | [optional] | |
expiresAt | java.time.OffsetDateTime | [optional] | |
expiresIn | kotlin.Long | [optional] | |
emailAddress | kotlin.String | [optional] | |
inboxType | kotlin.String | [optional] [enum: HTTP_INBOX, SMTP_INBOX] | |
description | kotlin.String | [optional] | |
name | kotlin.String | [optional] | |
tags | kotlin.collections.List | [optional] | |
favourite | kotlin.Boolean | [optional] | |
virtualInbox | kotlin.Boolean | [optional] |
Return type
Authorization
Configure API_KEY: ApiClient.apiKey["x-api-key"] = "" ApiClient.apiKeyPrefix["x-api-key"] = ""
HTTP request headers
- Content-Type: Not defined
- Accept: /
deleteEmailAddress(inboxId)
Delete inbox email address by inbox id
Deletes inbox email address
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 |
try {
apiInstance.deleteEmailAddress(inboxId)
} catch (e: ClientException) {
println("4xx response calling CommonActionsControllerApi#deleteEmailAddress")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CommonActionsControllerApi#deleteEmailAddress")
e.printStackTrace()
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | java.util.UUID |
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
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 |
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
Name | Type | Description | Notes |
---|---|---|---|
inboxId | java.util.UUID |
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(simpleSendEmailOptions)
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 simpleSendEmailOptions : SimpleSendEmailOptions = // SimpleSendEmailOptions |
try {
apiInstance.sendEmailSimple(simpleSendEmailOptions)
} catch (e: ClientException) {
println("4xx response calling CommonActionsControllerApi#sendEmailSimple")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CommonActionsControllerApi#sendEmailSimple")
e.printStackTrace()
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
simpleSendEmailOptions | SimpleSendEmailOptions |
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