mailslurp.api.CommonActionsControllerApi

Load the API package

import 'package:mailslurp/api.dart';

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, description, emailAddress, expiresAt, expiresIn, favourite, inboxType, name, tags, useDomainPool)

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';

final api_instance = CommonActionsControllerApi();
final allowTeamAccess = true; // bool | allowTeamAccess
final description = description_example; // String | description
final emailAddress = emailAddress_example; // String | emailAddress
final expiresAt = 2013-10-20T19:20:30+01:00; // DateTime | expiresAt
final expiresIn = 789; // int | expiresIn
final favourite = true; // bool | favourite
final inboxType = inboxType_example; // String | inboxType
final name = name_example; // String | name
final tags = []; // List<String> | tags
final useDomainPool = true; // bool | useDomainPool

try { 
    final result = api_instance.createNewEmailAddress(allowTeamAccess, description, emailAddress, expiresAt, expiresIn, favourite, inboxType, name, tags, useDomainPool);
    print(result);
} catch (e) {
    print('Exception when calling CommonActionsControllerApi->createNewEmailAddress: $en');
}

Parameters

NameTypeDescriptionNotes
allowTeamAccessboolallowTeamAccess[optional]
descriptionStringdescription[optional]
emailAddressStringemailAddress[optional]
expiresAtDateTimeexpiresAt[optional]
expiresInintexpiresIn[optional]
favouriteboolfavourite[optional]
inboxTypeStringinboxType[optional]
nameStringname[optional]
tagsListtags[optional] [default to const []]
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

Inbox createNewEmailAddress1(allowTeamAccess, description, emailAddress, expiresAt, expiresIn, favourite, inboxType, name, tags, useDomainPool)

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';

final api_instance = CommonActionsControllerApi();
final allowTeamAccess = true; // bool | allowTeamAccess
final description = description_example; // String | description
final emailAddress = emailAddress_example; // String | emailAddress
final expiresAt = 2013-10-20T19:20:30+01:00; // DateTime | expiresAt
final expiresIn = 789; // int | expiresIn
final favourite = true; // bool | favourite
final inboxType = inboxType_example; // String | inboxType
final name = name_example; // String | name
final tags = []; // List<String> | tags
final useDomainPool = true; // bool | useDomainPool

try { 
    final result = api_instance.createNewEmailAddress1(allowTeamAccess, description, emailAddress, expiresAt, expiresIn, favourite, inboxType, name, tags, useDomainPool);
    print(result);
} catch (e) {
    print('Exception when calling CommonActionsControllerApi->createNewEmailAddress1: $en');
}

Parameters

NameTypeDescriptionNotes
allowTeamAccessboolallowTeamAccess[optional]
descriptionStringdescription[optional]
emailAddressStringemailAddress[optional]
expiresAtDateTimeexpiresAt[optional]
expiresInintexpiresIn[optional]
favouriteboolfavourite[optional]
inboxTypeStringinboxType[optional]
nameStringname[optional]
tagsListtags[optional] [default to const []]
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

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';

final api_instance = CommonActionsControllerApi();
final inboxId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | inboxId

try { 
    api_instance.emptyInbox(inboxId);
} catch (e) {
    print('Exception when calling CommonActionsControllerApi->emptyInbox: $en');
}

Parameters

NameTypeDescriptionNotes
inboxIdStringinboxId

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

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';

final api_instance = CommonActionsControllerApi();
final emailOptions = SimpleSendEmailOptions(); // SimpleSendEmailOptions | emailOptions

try { 
    api_instance.sendEmailSimple(emailOptions);
} catch (e) {
    print('Exception when calling CommonActionsControllerApi->sendEmailSimple: $en');
}

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 ]