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

SMTP settings via url #1360

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

SMTP settings via url #1360

wants to merge 1 commit into from

Conversation

eval
Copy link
Collaborator

@eval eval commented Sep 7, 2019

This PR allows the SMTP-settings to be configured via a url, e.g.

Mail.defaults do
  delivery_method :smtp, url: 'smtps://user%40gmail.com:[email protected]'
end

The Travis-builds seemed to fail for reasons unrelated to the code. Fixing this failed so I setup separate builds reachable via the ✅ at https://gitlab.com/eval/mail/tree/smtp-url.

The included smtp-delivery examples for gmail and fastmail were successfully tested.

@eval eval force-pushed the smtp-url branch 4 times, most recently from 2994bd0 to d5be91d Compare September 10, 2019 14:29
@eval eval force-pushed the smtp-url branch 5 times, most recently from a5cf440 to c7cf494 Compare September 20, 2019 18:50
@eval eval marked this pull request as ready for review September 20, 2019 18:57
@eval
Copy link
Collaborator Author

eval commented Sep 27, 2019

Draft-status removed - feedback welcome!

@mikel
Copy link
Owner

mikel commented Dec 3, 2022

Nice @eval ! - Please rebase this onto latest master, include a changelog and I'll include it in 2.9

@mikel mikel added this to the 2.9.0 milestone Dec 3, 2022
@eval eval force-pushed the smtp-url branch 2 times, most recently from 546dbf8 to faacfb3 Compare December 9, 2022 13:37
@eval
Copy link
Collaborator Author

eval commented Dec 9, 2022

Hi @mikel, I updated the PR. I made the following changes:

  • url-attributes now take precedence, so it's similar to how one would configure the database in Rails.
  • I used different default-settings in case of smtp for localhost and non-localhost.
    This to make targeting a test-setup (e.g. mailcatcher) convenient, but also to require starttls by default for non-localhosts.

I tested the setup using mailcatcher and fastmail.

@eval eval force-pushed the smtp-url branch 5 times, most recently from 5508231 to 7360d84 Compare December 15, 2022 10:26
@eval
Copy link
Collaborator Author

eval commented Dec 15, 2022

Updated docs&code to bring in line with the new acceptable values for enable_starttls.

@eval eval requested a review from sebbASF January 16, 2023 11:13
@sebbASF
Copy link
Contributor

sebbASF commented Jan 16, 2023

Sorry, but I am not sufficiently familiar with this part of the code to do a review. Please select someone else.

@eval eval requested review from jeremy and removed request for sebbASF January 26, 2023 12:14
@eval eval requested a review from mikel January 26, 2023 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants