Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty recipients #40

Closed
wants to merge 2 commits into from
Closed

Empty recipients #40

wants to merge 2 commits into from

Conversation

paulcsmith
Copy link
Contributor

I'm not sure about this, but I'm going to open it up and think about it a bit

Paul Smith added 2 commits January 23, 2016 00:00
I'm not sure about this but I'm going to give it a try.
if email.to == [] and email.cc == [] and email.bcc == [] do
{:no_recipients, email}
else
send_email(email, config)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be {:ok, email} so you can pattern match on the result...? Then I'd need to add deliver! and deliver_async! I think, and not raise here if there is an API error, instead return {:error, mandrill_response}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Being able to pattern match on the result seems useful. As you said you would need to add deliver! and deliver_async! but that's probably fine.

paulcsmith added a commit that referenced this pull request Feb 11, 2016
@paulcsmith
Copy link
Contributor Author

Closed in favor of #67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants