Coder Social home page Coder Social logo

courier's People

Contributors

bcardarella avatar cibernox avatar daniel-xu avatar roryqueue avatar thefirstavenger avatar wdalmut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

courier's Issues

Null adapter

There are instances when you want emails to do nothing. A null adapter would be useful.

Feature request: Track delivery failures at the adapter level

Use case

Let's say you send out 10,000 e-mails advertising your latest shiny product. It would be extremely beneficial to know how many of those e-mails bounced for tracking purposes in third party tooling.

An e-mail can bounce in 2 ways, a soft and hard bounce. SendGrid has a nice article articulating the difference between the 2 https://sendgrid.com/blog/email-bounce-management/.

Feature

In the response of the sent message call, include if it was a success, soft bounce, hard bounce and perhaps other forms of failure that I haven't thought of but are common.

Can't Send Email in Prod

I know this is probably something really stupid that I'm overlooking...

I am able to send email when running my app locally, but not after deploying.

This is the error I get:

01:22:12.077 [error] Process #PID<0.6419.0> raised an exception
** (FunctionClauseError) no function clause matching in :base64.encode/1
    (stdlib) base64.erl:64: :base64.encode(nil)
    src/gen_smtp_client.erl:375: :gen_smtp_client.do_AUTH_each/4
    src/gen_smtp_client.erl:322: :gen_smtp_client.try_AUTH/3
    src/gen_smtp_client.erl:203: :gen_smtp_client.do_smtp_session/3
    src/gen_smtp_client.erl:142: :gen_smtp_client.try_smtp_sessions/4
    src/gen_smtp_client.erl:109: :gen_smtp_client.send_it_nonblock/3
** (EXIT from #PID<0.1695.0>) an exception was raised:
    ** (FunctionClauseError) no function clause matching in :base64.encode/1
        (stdlib) base64.erl:64: :base64.encode(nil)
        src/gen_smtp_client.erl:375: :gen_smtp_client.do_AUTH_each/4
        src/gen_smtp_client.erl:322: :gen_smtp_client.try_AUTH/3
        src/gen_smtp_client.erl:203: :gen_smtp_client.do_smtp_session/3
        src/gen_smtp_client.erl:142: :gen_smtp_client.try_smtp_sessions/4
        src/gen_smtp_client.erl:109: :gen_smtp_client.send_it_nonblock/3

This is my `config/confix.exs':

config :drip_emails, DripEmails.Mailer,
  adapter: Courier.Adapters.SMTP,
  relay: "email-smtp.us-east-1.amazonaws.com",
  port: 587,
  username: System.get_env("AWS_SMTP_USER"),
  password: System.get_env("AWS_SMTP_PASS")

This is my mix.lock for Courier:

 "courier": {:hex, :courier, "0.0.3", "a01a42d3c06b08989bc1003acd5a58db1c652b4c6ecb414286f70b8ca62a67ec", [:mix], [{:gen_smtp, "0.9.0", [hex: :gen_smtp, optional: false]}, {:mail, "~> 0.0.4", [hex: :mail, optional: false]}]}

The way I'm reading these errors, its as if :gen_smtp can't parse the username / password because they aren't set. But when I inspect the values of those AWS_SMTP_*** env vars, they are clearly set.

Again, everything works fine locally, but not after deploying on Heroku.

Any thoughts?

Feature request: Load balancing adapters

Use case

You have a mailing list with 500,000 people and mailing back-ends such as Amazon SES and SendGrid enforce limits such as 10 mails per second or 50 mails per second.

This increases the total send time for a "campaign" and is most definitely the biggest bottleneck when it comes to sending out a lot of e-mails in bulk.

Feature

It would be really nice if you could configure something to load balance multiple adapters that are configured. The first implementation could be a round robin balancer which simply alternates sending e-mails out to each adapter.

Down the line (or now if it's not difficult?) it would be interesting if you could supply your limit to the adapter in the form of e-mails per second and then introduce an algorithm that determines the fastest way to deliver all of your e-mails.

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.