Giter Site home page Giter Site logo

mail_in_a_box's Introduction

MailInABox

Description

Mail In A Box is a simple wrapper for MailInABox APIs.

Installation

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

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

Configuration:

Add your mailbox information in your config file

#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

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

mail_in_a_box's People

Contributors

a-l-t-e-r avatar ourway avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.