mail_in_a_box v0.1.7 MailInABox View Source

Email accounts administration. Adding/removing new email accounts dynamicly with this module is possible.

For adding a new account:

{:ok, account_info} = PTE.MailAdmin.add_account("something", "secret")

Removing account:

:ok = PTE.MailAdmin.remove_account("something")

Link to this section Summary

Functions

Add a new email account if not already available.

gets list of email accounts with their status

Removes an email account

Link to this section Functions

Link to this function

add_account(email, pass)

View Source
add_account(String.t(), String.t()) ::
  {:ok, 200} | {:error, integer(), String.t()}

Add a new email account if not already available.

{:ok, account_info} =

  PTE.MailAdmin.add_account("something@english-learning.ir", "secret")

Returns {:error, reason} in case of error.

Link to this function

get_accounts()

View Source
get_accounts() :: map()

gets list of email accounts with their status

Link to this function

remove_account(email)

View Source
remove_account(String.t()) :: {:ok, 200} | {:error, integer(), String.t()}

Removes an email account

:ok = PTE.MailAdmin.remove_account("something@english-learning.ir")

Returns {:error, reason} in case of error.