Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add support for SMTP with SSL. #423

Closed
wants to merge 1 commit into from

1 participant

@airblade

Fastmail requires SMTP to use SSL but not STARTTLS. This change enables
ones to turn on SSL without automatically starting TLS.

Here are some relevant links:

http://blog.fastmail.fm/2012/05/21/enforcing-ssltls-encryption-of-all-connections/
https://www.fastmail.fm/docs/encryption.html#ot

@airblade airblade Add support for SMTP with SSL.
Fastmail requires SMTP to use SSL but not STARTTLS.  This change enables
ones to turn on SSL without automatically starting TLS.

Here are some relevant links:

http://blog.fastmail.fm/2012/05/21/enforcing-ssltls-encryption-of-all-connections/
https://www.fastmail.fm/docs/encryption.html#ot
18a9bcd
@ghost

Would it make more sense to have a single option for this?

notify_by Mail do |mail|
  mail.encryption = :starttls # or :ssl (or :tls)

Setting Mail's :ssl or :tls option to true negates it's enable_starttls_auto setting.
Net::SMTP does not distinguish between :ssl or :tls, but having the option accept both might be easier for users following various email client setup instructions to understand.

https://github.com/meskyanichi/backup/compare/mail_notifier

What do you think?

@airblade

Good idea – I agree.

@ghost Unknown closed this pull request from a commit
Brian D. Burns add Notifier::Mail#encryption setting (closes #423)
Allows SMTP to be configured to use STARTTLS or directly use a SSL/TLS
connection. Deprecates Notifier::Mail#enable_starttls_auto.
1c6be33
@ghost ghost closed this in 1c6be33
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 25, 2013
  1. @airblade

    Add support for SMTP with SSL.

    airblade authored
    Fastmail requires SMTP to use SSL but not STARTTLS.  This change enables
    ones to turn on SSL without automatically starting TLS.
    
    Here are some relevant links:
    
    http://blog.fastmail.fm/2012/05/21/enforcing-ssltls-encryption-of-all-connections/
    https://www.fastmail.fm/docs/encryption.html#ot
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/backup/notifier/mail.rb
View
8 lib/backup/notifier/mail.rb
@@ -76,6 +76,11 @@ class Mail < Base
attr_accessor :openssl_verify_mode
##
+ # Automatically set SSL
+ # Example: true
+ attr_accessor :ssl
+
+ ##
# When using the `:sendmail` `delivery_method` option,
# this may be used to specify the absolute path to `sendmail` (if needed)
# Example: '/usr/sbin/sendmail'
@@ -174,7 +179,8 @@ def new_email
:password => @password,
:authentication => @authentication,
:enable_starttls_auto => @enable_starttls_auto,
- :openssl_verify_mode => @openssl_verify_mode }
+ :openssl_verify_mode => @openssl_verify_mode,
+ :ssl => @ssl }
when 'sendmail'
opts = {}
opts.merge!(:location => File.expand_path(@sendmail)) if @sendmail
Something went wrong with that request. Please try again.