Skip to content

MailSlurp::CommonActionsControllerApi

Load the API package

use MailSlurp::Object::CommonActionsControllerApi;

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

Method HTTP request Description
create_new_email_address POST /newEmailAddress Create new random inbox
create_random_inbox POST /createInbox Create new random inbox
delete_email_address DELETE /deleteEmailAddress Delete inbox email address by inbox id
empty_inbox DELETE /emptyInbox Delete all emails in an inbox
send_email_simple POST /sendEmail Send an email

InboxDto create_new_email_address(allow_team_access => $allow_team_access, use_domain_pool => $use_domain_pool, expires_at => $expires_at, expires_in => $expires_in, email_address => $email_address, inbox_type => $inbox_type, description => $description, name => $name, tags => $tags, favourite => $favourite, virtual_inbox => $virtual_inbox)

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 | 
my $use_domain_pool = null; # boolean | 
my $expires_at = DateTime->from_epoch(epoch => str2time('null')); # DateTime | 
my $expires_in = 789; # int | 
my $email_address = "email_address_example"; # string | 
my $inbox_type = "inbox_type_example"; # string | 
my $description = "description_example"; # string | 
my $name = "name_example"; # string | 
my $tags = [("null")]; # ARRAY[string] | 
my $favourite = null; # boolean | 
my $virtual_inbox = null; # boolean | 

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

Parameters

Name Type Description Notes
allow_team_access boolean [optional]
use_domain_pool boolean [optional]
expires_at DateTime [optional]
expires_in int [optional]
email_address string [optional]
inbox_type string [optional]
description string [optional]
name string [optional]
tags ARRAY[string] [optional]
favourite boolean [optional]
virtual_inbox boolean [optional]

Return type

InboxDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

InboxDto create_random_inbox(allow_team_access => $allow_team_access, use_domain_pool => $use_domain_pool, expires_at => $expires_at, expires_in => $expires_in, email_address => $email_address, inbox_type => $inbox_type, description => $description, name => $name, tags => $tags, favourite => $favourite, virtual_inbox => $virtual_inbox)

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 | 
my $use_domain_pool = null; # boolean | 
my $expires_at = DateTime->from_epoch(epoch => str2time('null')); # DateTime | 
my $expires_in = 789; # int | 
my $email_address = "email_address_example"; # string | 
my $inbox_type = "inbox_type_example"; # string | 
my $description = "description_example"; # string | 
my $name = "name_example"; # string | 
my $tags = [("null")]; # ARRAY[string] | 
my $favourite = null; # boolean | 
my $virtual_inbox = null; # boolean | 

eval { 
    my $result = $api_instance->create_random_inbox(allow_team_access => $allow_team_access, use_domain_pool => $use_domain_pool, expires_at => $expires_at, expires_in => $expires_in, email_address => $email_address, inbox_type => $inbox_type, description => $description, name => $name, tags => $tags, favourite => $favourite, virtual_inbox => $virtual_inbox);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CommonActionsControllerApi->create_random_inbox: $@n";
}

Parameters

Name Type Description Notes
allow_team_access boolean [optional]
use_domain_pool boolean [optional]
expires_at DateTime [optional]
expires_in int [optional]
email_address string [optional]
inbox_type string [optional]
description string [optional]
name string [optional]
tags ARRAY[string] [optional]
favourite boolean [optional]
virtual_inbox boolean [optional]

Return type

InboxDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[Back to top] [Back to API list] [Back to Model list] [Back to ]

delete_email_address(inbox_id => $inbox_id)

Delete inbox email address by inbox id

Deletes inbox email address

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 | 

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

Parameters

Name Type Description Notes
inbox_id string

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 ]

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 | 

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

Parameters

Name Type Description Notes
inbox_id string

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(simple_send_email_options => $simple_send_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 $simple_send_email_options = MailSlurp::Object::SimpleSendEmailOptions->new(); # SimpleSendEmailOptions | 

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

Parameters

Name Type Description Notes
simple_send_email_options SimpleSendEmailOptions

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 ]