mail icon indicating copy to clipboard operation
mail copied to clipboard

SMTP settings via url

Open eval opened this issue 5 years ago • 5 comments

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 avatar Sep 07 '19 17:09 eval

Draft-status removed - feedback welcome!

eval avatar Sep 27 '19 09:09 eval

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

mikel avatar Dec 03 '22 09:12 mikel

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 avatar Dec 09 '22 13:12 eval

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

eval avatar Dec 15 '22 10:12 eval

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

sebbASF avatar Jan 16 '23 22:01 sebbASF