MailSlurpAPI.Api.AliasController (mailslurp v15.17.22)

API calls for all endpoints tagged AliasController.

Summary

Functions

Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached

Get an email alias Get an email alias by ID

Get emails for an alias Get paginated emails for an alias by ID

Get threads created for an alias Returns threads created for an email alias in paginated form

Get all email aliases you have created Get all email aliases in paginated form

Reply to an email Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails to, cc, and bcc.

Send an email from an alias inbox Send an email from an alias. Replies to the email will be forwarded to the alias masked email address

Functions

Link to this function

create_alias(connection, create_alias_options, opts \\ [])

Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • create_alias_options (CreateAliasOptions):
  • opts (KeywordList): [optional] Optional parameters

Returns

} on success {:error, info} on failure

Link to this function

delete_alias(connection, alias_id, opts \\ [])

@spec delete_alias(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

Delete an email alias

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • alias_id (String.t):
  • opts (KeywordList): [optional] Optional parameters

Returns

} on success {:error, info} on failure

Link to this function

get_alias(connection, alias_id, opts \\ [])

@spec get_alias(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, MailSlurpAPI.Model.AliasDto.t()} | {:error, Tesla.Env.t()}

Get an email alias Get an email alias by ID

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • alias_id (String.t):
  • opts (KeywordList): [optional] Optional parameters

Returns

} on success {:error, info} on failure

Link to this function

get_alias_emails(connection, alias_id, opts \\ [])

@spec get_alias_emails(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, MailSlurpAPI.Model.PageEmailProjection.t()} | {:error, Tesla.Env.t()}

Get emails for an alias Get paginated emails for an alias by ID

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • alias_id (String.t):
  • opts (KeywordList): [optional] Optional parameters
    • :page (integer()): Optional page index alias email list pagination
    • :size (integer()): Optional page size alias email list pagination
    • :sort (String.t): Optional createdAt sort direction ASC or DESC
    • :since (DateTime.t): Optional filter by sent after given date time
    • :before (DateTime.t): Optional filter by sent before given date time

Returns

} on success {:error, info} on failure

Link to this function

get_alias_threads(connection, alias_id, opts \\ [])

@spec get_alias_threads(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, MailSlurpAPI.Model.PageThreadProjection.t()} | {:error, Tesla.Env.t()}

Get threads created for an alias Returns threads created for an email alias in paginated form

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • alias_id (String.t):
  • opts (KeywordList): [optional] Optional parameters
    • :page (integer()): Optional page index in thread list pagination
    • :size (integer()): Optional page size in thread list pagination
    • :sort (String.t): Optional createdAt sort direction ASC or DESC
    • :since (DateTime.t): Optional filter by sent after given date time
    • :before (DateTime.t): Optional filter by sent before given date time

Returns

} on success {:error, info} on failure

Link to this function

get_aliases(connection, opts \\ [])

@spec get_aliases(Tesla.Env.client(), keyword()) ::
  {:ok, MailSlurpAPI.Model.PageAlias.t()} | {:error, Tesla.Env.t()}

Get all email aliases you have created Get all email aliases in paginated form

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :page (integer()): Optional page index in alias list pagination
    • :size (integer()): Optional page size in alias list pagination
    • :sort (String.t): Optional createdAt sort direction ASC or DESC
    • :since (DateTime.t): Filter by created at after the given timestamp
    • :before (DateTime.t): Filter by created at before the given timestamp

Returns

} on success {:error, info} on failure

Link to this function

reply_to_alias_email(connection, alias_id, email_id, reply_to_alias_email_options, opts \\ [])

Reply to an email Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails to, cc, and bcc.

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • alias_id (String.t): ID of the alias that email belongs to
  • email_id (String.t): ID of the email that should be replied to
  • reply_to_alias_email_options (ReplyToAliasEmailOptions):
  • opts (KeywordList): [optional] Optional parameters

Returns

} on success {:error, info} on failure

Link to this function

send_alias_email(connection, alias_id, send_email_options, opts \\ [])

Send an email from an alias inbox Send an email from an alias. Replies to the email will be forwarded to the alias masked email address

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • alias_id (String.t):
  • send_email_options (SendEmailOptions):
  • opts (KeywordList): [optional] Optional parameters

Returns

} on success {:error, info} on failure

Link to this function

update_alias(connection, alias_id, update_alias_options, opts \\ [])

Update an email alias

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • alias_id (String.t):
  • update_alias_options (UpdateAliasOptions):
  • opts (KeywordList): [optional] Optional parameters

Returns

} on success {:error, info} on failure