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

Return the SMTP server response when sending an e-mail #122

Merged
merged 4 commits into from
Aug 27, 2019

Conversation

l0ck3
Copy link

@l0ck3 l0ck3 commented Aug 26, 2019

Adresses #121

The Bamboo.SMTPAdapter.deliver/1 now returns the raw response of the SMTP server when an e-mail is sent successfully.

Previously: :ok
Now: {:ok, <response>}

⚠️ Requires a major version bump since it breaks the existing API.

@l0ck3 l0ck3 requested review from kdisneur and removed request for arnaudmorisset August 27, 2019 07:42
@kdisneur
Copy link
Contributor

If we want to use this feature, we need to add an extra response: true parameter to Bamboo as explained here. Otherwise Bamboo won't forward the response from the adapter:

BambooTrial.Mailer.deliver_now(BambooTrial.Email.test_email(), response: true)

# => {%Bamboo.Email{....}, {:ok, "Ok 0102016cd2444445-1a01c99c-6dc3-4c67-b703-11e000b9d642-000000\r\n"}}

@l0ck3 l0ck3 merged commit 848ea35 into develop Aug 27, 2019
@l0ck3 l0ck3 deleted the feature/get-response-from-smtp-server branch August 27, 2019 09:07
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.

2 participants