mailslurp.api.CommonActionsControllerApi
Load the API package
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 '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 |
final useDomainPool = true; // bool |
final expiresAt = 2013-10-20T19:20:30+01:00; // DateTime |
final expiresIn = 789; // int |
final emailAddress = emailAddress_example; // String |
final inboxType = inboxType_example; // String |
final description = description_example; // String |
final name = name_example; // String |
final tags = []; // List<String> |
final favourite = true; // bool |
final virtualInbox = true; // bool |
try {
final result = api_instance.createNewEmailAddress(allowTeamAccess, useDomainPool, expiresAt, expiresIn, emailAddress, inboxType, description, name, tags, favourite, virtualInbox);
print(result);
} catch (e) {
print('Exception when calling CommonActionsControllerApi->createNewEmailAddress: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
allowTeamAccess | bool | [optional] | |
useDomainPool | bool | [optional] | |
expiresAt | DateTime | [optional] | |
expiresIn | int | [optional] | |
emailAddress | String | [optional] | |
inboxType | String | [optional] | |
description | String | [optional] | |
name | String | [optional] | |
tags | List | [optional] [default to const []] | |
favourite | bool | [optional] | |
virtualInbox | bool | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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 '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 |
final useDomainPool = true; // bool |
final expiresAt = 2013-10-20T19:20:30+01:00; // DateTime |
final expiresIn = 789; // int |
final emailAddress = emailAddress_example; // String |
final inboxType = inboxType_example; // String |
final description = description_example; // String |
final name = name_example; // String |
final tags = []; // List<String> |
final favourite = true; // bool |
final virtualInbox = true; // bool |
try {
final result = api_instance.createRandomInbox(allowTeamAccess, useDomainPool, expiresAt, expiresIn, emailAddress, inboxType, description, name, tags, favourite, virtualInbox);
print(result);
} catch (e) {
print('Exception when calling CommonActionsControllerApi->createRandomInbox: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
allowTeamAccess | bool | [optional] | |
useDomainPool | bool | [optional] | |
expiresAt | DateTime | [optional] | |
expiresIn | int | [optional] | |
emailAddress | String | [optional] | |
inboxType | String | [optional] | |
description | String | [optional] | |
name | String | [optional] | |
tags | List | [optional] [default to const []] | |
favourite | bool | [optional] | |
virtualInbox | bool | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to ]
deleteEmailAddress(inboxId)
Delete inbox email address by inbox id
Deletes inbox email address
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 |
try {
api_instance.deleteEmailAddress(inboxId);
} catch (e) {
print('Exception when calling CommonActionsControllerApi->deleteEmailAddress: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | String |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to ]
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 |
try {
api_instance.emptyInbox(inboxId);
} catch (e) {
print('Exception when calling CommonActionsControllerApi->emptyInbox: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | String |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to ]
sendEmailSimple(simpleSendEmailOptions)
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 simpleSendEmailOptions = SimpleSendEmailOptions(); // SimpleSendEmailOptions |
try {
api_instance.sendEmailSimple(simpleSendEmailOptions);
} catch (e) {
print('Exception when calling CommonActionsControllerApi->sendEmailSimple: $en');
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
simpleSendEmailOptions | SimpleSendEmailOptions |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to ]