# mailslurp.api.CommonActionsControllerApi

# Load the API package

import 'package:mailslurp/api.dart';

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

Inbox createNewEmailAddress()

Create new random inbox

Returns an Inbox with an id and an emailAddress

# Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
var api_instance = CommonActionsControllerApi();
try { 
    var result = api_instance.createNewEmailAddress();
    print(result);
} catch (e) {
    print("Exception when calling CommonActionsControllerApi->createNewEmailAddress: $e\n");
}

# 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

Inbox createNewEmailAddress1()

Create new random inbox

Returns an Inbox with an id and an emailAddress

# Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
var api_instance = CommonActionsControllerApi();
try { 
    var result = api_instance.createNewEmailAddress1();
    print(result);
} catch (e) {
    print("Exception when calling CommonActionsControllerApi->createNewEmailAddress1: $e\n");
}

# 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

emptyInbox(inboxId)

Delete all emails in an inbox

Deletes all emails

# Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
var api_instance = CommonActionsControllerApi();
var inboxId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | inboxId
try { 
    api_instance.emptyInbox(inboxId);
} catch (e) {
    print("Exception when calling CommonActionsControllerApi->emptyInbox: $e\n");
}

# Parameters

Name Type Description Notes
inboxId String inboxId [default to null]

# 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

sendEmailSimple(emailOptions)

Send an email

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

# Example

import 'package:mailslurp/api.dart';
// TODO Configure API key authorization: API_KEY
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('API_KEY').apiKeyPrefix = 'Bearer';
var api_instance = CommonActionsControllerApi();
var emailOptions = SimpleSendEmailOptions(); // SimpleSendEmailOptions | emailOptions
try { 
    api_instance.sendEmailSimple(emailOptions);
} catch (e) {
    print("Exception when calling CommonActionsControllerApi->sendEmailSimple: $e\n");
}

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