mailslurp_netstandard_2x.Api.CommonActionsControllerApi

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 (bool? allowTeamAccess = null, string description = null, string emailAddress = null, DateTime? expiresAt = null, long? expiresIn = null, bool? favourite = null, string inboxType = null, string name = null, List tags = null, bool? useDomainPool = null)

Create new random inbox

Returns an Inbox with an id and an emailAddress

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;

namespace Example
{
    public class CreateNewEmailAddressExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new CommonActionsControllerApi(config);
            var allowTeamAccess = true;  // bool? | allowTeamAccess (optional) 
            var description = description_example;  // string | description (optional) 
            var emailAddress = emailAddress_example;  // string | emailAddress (optional) 
            var expiresAt = 2013-10-20T19:20:30+01:00;  // DateTime? | expiresAt (optional) 
            var expiresIn = 789;  // long? | expiresIn (optional) 
            var favourite = true;  // bool? | favourite (optional) 
            var inboxType = inboxType_example;  // string | inboxType (optional) 
            var name = name_example;  // string | name (optional) 
            var tags = new List<string>(); // List<string> | tags (optional) 
            var useDomainPool = true;  // bool? | useDomainPool (optional) 

            try
            {
                // Create new random inbox
                Inbox result = apiInstance.CreateNewEmailAddress(allowTeamAccess, description, emailAddress, expiresAt, expiresIn, favourite, inboxType, name, tags, useDomainPool);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling CommonActionsControllerApi.CreateNewEmailAddress: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
allowTeamAccessbool?allowTeamAccess[optional]
descriptionstringdescription[optional]
emailAddressstringemailAddress[optional]
expiresAtDateTime?expiresAt[optional]
expiresInlong?expiresIn[optional]
favouritebool?favourite[optional]
inboxTypestringinboxType[optional]
namestringname[optional]
tagsListtags[optional]
useDomainPoolbool?useDomainPool[optional]

Return type

Inbox

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
201Created-
401Unauthorized-
403Forbidden-
404Not Found-

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

CreateNewEmailAddress1

Inbox CreateNewEmailAddress1 (bool? allowTeamAccess = null, string description = null, string emailAddress = null, DateTime? expiresAt = null, long? expiresIn = null, bool? favourite = null, string inboxType = null, string name = null, List tags = null, bool? useDomainPool = null)

Create new random inbox

Returns an Inbox with an id and an emailAddress

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;

namespace Example
{
    public class CreateNewEmailAddress1Example
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new CommonActionsControllerApi(config);
            var allowTeamAccess = true;  // bool? | allowTeamAccess (optional) 
            var description = description_example;  // string | description (optional) 
            var emailAddress = emailAddress_example;  // string | emailAddress (optional) 
            var expiresAt = 2013-10-20T19:20:30+01:00;  // DateTime? | expiresAt (optional) 
            var expiresIn = 789;  // long? | expiresIn (optional) 
            var favourite = true;  // bool? | favourite (optional) 
            var inboxType = inboxType_example;  // string | inboxType (optional) 
            var name = name_example;  // string | name (optional) 
            var tags = new List<string>(); // List<string> | tags (optional) 
            var useDomainPool = true;  // bool? | useDomainPool (optional) 

            try
            {
                // Create new random inbox
                Inbox result = apiInstance.CreateNewEmailAddress1(allowTeamAccess, description, emailAddress, expiresAt, expiresIn, favourite, inboxType, name, tags, useDomainPool);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling CommonActionsControllerApi.CreateNewEmailAddress1: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
allowTeamAccessbool?allowTeamAccess[optional]
descriptionstringdescription[optional]
emailAddressstringemailAddress[optional]
expiresAtDateTime?expiresAt[optional]
expiresInlong?expiresIn[optional]
favouritebool?favourite[optional]
inboxTypestringinboxType[optional]
namestringname[optional]
tagsListtags[optional]
useDomainPoolbool?useDomainPool[optional]

Return type

Inbox

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
201Created-
401Unauthorized-
403Forbidden-
404Not Found-

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

EmptyInbox

void EmptyInbox (Guid inboxId)

Delete all emails in an inbox

Deletes all emails

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;

namespace Example
{
    public class EmptyInboxExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new CommonActionsControllerApi(config);
            var inboxId = new Guid(); // Guid | inboxId

            try
            {
                // Delete all emails in an inbox
                apiInstance.EmptyInbox(inboxId);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling CommonActionsControllerApi.EmptyInbox: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
inboxIdGuidinboxId

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status codeDescriptionResponse headers
204No Content-
401Unauthorized-
403Forbidden-

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

SendEmailSimple

void SendEmailSimple (SimpleSendEmailOptions emailOptions)

Send an email

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

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;

namespace Example
{
    public class SendEmailSimpleExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new CommonActionsControllerApi(config);
            var emailOptions = new SimpleSendEmailOptions(); // SimpleSendEmailOptions | emailOptions

            try
            {
                // Send an email
                apiInstance.SendEmailSimple(emailOptions);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling CommonActionsControllerApi.SendEmailSimple: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
emailOptionsSimpleSendEmailOptionsemailOptions

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

HTTP response details

Status codeDescriptionResponse headers
201Created-
401Unauthorized-
403Forbidden-
404Not Found-

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