Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ourway/mail_in_a_box

Elixir client for managing email accounts for a mailinabox
https://github.com/ourway/mail_in_a_box

client elixir elixir-library mailinabox

Last synced: 2 days ago
JSON representation

Elixir client for managing email accounts for a mailinabox

Awesome Lists containing this project

README

        

# MailInABox

## Description

Mail In A Box is a simple wrapper for
[MailInABox](https://mailinabox.email?_src=https://github.com/ourway/mail_in_a_box/)
APIs.

## Installation

Install it by adding `mail_in_a_box` to your list of dependencies in `mix.exs`:

```elixir
def deps do
[
{:mail_in_a_box, "~> 0.2.0"}
]
end
```

## Configuration:

Add your mailbox information in your config file

```elixir
#config/config.exs

...

config :mail_in_a_box, MIAB.Admin,
admin_user: "[email protected]",
admin_pass: "39uq8k7SW8",
endpoint: "https://box.example.org",
domain: "example.org"

config :mail_in_a_box, MIAB.IMAP,
account: "[email protected]",
password: "14de0ea2-6187",
use_ssl: false,
incoming_mail_server: "box.example.org",
incoming_port: 993

config :mail_in_a_box, MIAB.Sender,
adapter: Swoosh.Adapters.SMTP,
relay: "box.example.org",
username: "[email protected]",
password: "bbe8-33690cfbfeff",
ssl: false,
tls: :always,
auth: :always,
port: 587,
no_mx_lookups: false,
retries: 2

config :mail_in_a_box, MIAB.Send,
## Sender information
email: "[email protected]",
from: "Iranian English Learning Platform",
org: "Iranian English Learning Mock Tests Center",
org_email: "[email protected]",
org_webiste: "https://example.org",
# user email will be appended to unsub url
unsub_url: "https://pte.example.org/api/v1/emails/unsubscribe/",
signature: "\nRegards,\nYour English Learning Platform Team."
...

```

## Usage

```elixir

MIAB.Send.welcome(%{name: "your name", email: "[email protected]"})

```

## Testing

I tested the project with `100%` coverage. Please you `mix test --trace` to
see if everything is OK. Bugs reports are welcome.

## Author

Farsheed Ashouri

## License

MIT