MailSlurp::CommonActionsControllerApi

Load the API package

use MailSlurp::Object::CommonActionsControllerApi;

All URIs are relative to https://api.mailslurp.com

MethodHTTP requestDescription
create_new_email_addressPOST /createInboxCreate new random inbox
create_new_email_address1POST /newEmailAddressCreate new random inbox
empty_inboxDELETE /emptyInboxDelete all emails in an inbox
send_email_simplePOST /sendEmailSend an email

create_new_email_address

Inbox create_new_email_address(allow_team_access => $allow_team_access, expires_at => $expires_at, expires_in => $expires_in, use_domain_pool => $use_domain_pool)

Create new random inbox

Returns an Inbox with an id and an emailAddress

Example

use Data::Dumper;
use MailSlurp::CommonActionsControllerApi;
my $api_instance = MailSlurp::CommonActionsControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $allow_team_access = null; # boolean | allowTeamAccess
my $expires_at = DateTime->from_epoch(epoch => str2time('null')); # DateTime | expiresAt
my $expires_in = 789; # int | expiresIn
my $use_domain_pool = null; # boolean | useDomainPool

eval { 
    my $result = $api_instance->create_new_email_address(allow_team_access => $allow_team_access, expires_at => $expires_at, expires_in => $expires_in, use_domain_pool => $use_domain_pool);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommonActionsControllerApi->create_new_email_address: $@n";
}

Parameters

NameTypeDescriptionNotes
allow_team_accessbooleanallowTeamAccess[optional]
expires_atDateTimeexpiresAt[optional]
expires_inintexpiresIn[optional]
use_domain_poolbooleanuseDomainPool[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 ]

create_new_email_address1

Inbox create_new_email_address1(allow_team_access => $allow_team_access, expires_at => $expires_at, expires_in => $expires_in, use_domain_pool => $use_domain_pool)

Create new random inbox

Returns an Inbox with an id and an emailAddress

Example

use Data::Dumper;
use MailSlurp::CommonActionsControllerApi;
my $api_instance = MailSlurp::CommonActionsControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $allow_team_access = null; # boolean | allowTeamAccess
my $expires_at = DateTime->from_epoch(epoch => str2time('null')); # DateTime | expiresAt
my $expires_in = 789; # int | expiresIn
my $use_domain_pool = null; # boolean | useDomainPool

eval { 
    my $result = $api_instance->create_new_email_address1(allow_team_access => $allow_team_access, expires_at => $expires_at, expires_in => $expires_in, use_domain_pool => $use_domain_pool);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommonActionsControllerApi->create_new_email_address1: $@n";
}

Parameters

NameTypeDescriptionNotes
allow_team_accessbooleanallowTeamAccess[optional]
expires_atDateTimeexpiresAt[optional]
expires_inintexpiresIn[optional]
use_domain_poolbooleanuseDomainPool[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 ]

empty_inbox

empty_inbox(inbox_id => $inbox_id)

Delete all emails in an inbox

Deletes all emails

Example

use Data::Dumper;
use MailSlurp::CommonActionsControllerApi;
my $api_instance = MailSlurp::CommonActionsControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $inbox_id = null; # string | inboxId

eval { 
    $api_instance->empty_inbox(inbox_id => $inbox_id);
};
if ($@) {
    warn "Exception when calling CommonActionsControllerApi->empty_inbox: $@n";
}

Parameters

NameTypeDescriptionNotes
inbox_idstringinboxId

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 ]

send_email_simple

send_email_simple(email_options => $email_options)

Send an email

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

Example

use Data::Dumper;
use MailSlurp::CommonActionsControllerApi;
my $api_instance = MailSlurp::CommonActionsControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $email_options = MailSlurp::Object::SimpleSendEmailOptions->new(); # SimpleSendEmailOptions | emailOptions

eval { 
    $api_instance->send_email_simple(email_options => $email_options);
};
if ($@) {
    warn "Exception when calling CommonActionsControllerApi->send_email_simple: $@n";
}

Parameters

NameTypeDescriptionNotes
email_optionsSimpleSendEmailOptionsemailOptions

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 ]