Class: Backup::Notifier::Mail
Instance Attribute Summary collapse
-
#address ⇒ Object
The address to use Example: smtp.gmail.com.
-
#authentication ⇒ Object
Authentication type Example: plain.
-
#delivery_method ⇒ Object
Mail delivery method to be used by the Mail gem.
-
#domain ⇒ Object
Your domain (if applicable) Example: mydomain.com.
-
#enable_starttls_auto ⇒ Object
Automatically set TLS Example: true.
-
#exim ⇒ Object
When using the
:eximdelivery_methodoption, this may be used to specify the absolute path toexim(if needed) Example: ‘/usr/sbin/exim’. -
#exim_args ⇒ Object
Optional arguments to pass to
eximNote that this will override the defaults set by the Mail gem (currently: ‘-i -t’) So, if set here, be sure to set all the arguments you require. -
#from ⇒ Object
Sender and Receiver email addresses Examples: sender - [email protected] receiver - [email protected].
-
#mail_folder ⇒ Object
Folder where mail will be kept when using the
:filedelivery_methodoption. -
#openssl_verify_mode ⇒ Object
OpenSSL Verify Mode Example: none - Only use this option for a self-signed and/or wildcard certificate.
-
#password ⇒ Object
Username and Password (sender email’s credentials) Examples: user_name - meskyanichi password - my_secret_password.
-
#port ⇒ Object
The port to connect to Example: 587.
-
#sendmail ⇒ Object
When using the
:sendmaildelivery_methodoption, this may be used to specify the absolute path tosendmail(if needed) Example: ‘/usr/sbin/sendmail’. -
#sendmail_args ⇒ Object
Optional arguments to pass to
sendmailNote that this will override the defaults set by the Mail gem (currently: ‘-i -t’) So, if set here, be sure to set all the arguments you require. -
#to ⇒ Object
Sender and Receiver email addresses Examples: sender - [email protected] receiver - [email protected].
-
#user_name ⇒ Object
Username and Password (sender email’s credentials) Examples: user_name - meskyanichi password - my_secret_password.
Attributes inherited from Base
#on_failure, #on_success, #on_warning
Instance Method Summary collapse
-
#initialize(model, &block) ⇒ Mail
constructor
A new instance of Mail.
Methods inherited from Base
Methods included from Configuration::Helpers
#clear_defaults!, #load_defaults!
Constructor Details
#initialize(model, &block) ⇒ Mail
Returns a new instance of Mail.
110 111 112 113 114 |
# File 'lib/backup/notifier/mail.rb', line 110 def initialize(model, &block) super(model) instance_eval(&block) if block_given? end |
Instance Attribute Details
#address ⇒ Object
The address to use Example: smtp.gmail.com
44 45 46 |
# File 'lib/backup/notifier/mail.rb', line 44 def address @address end |
#authentication ⇒ Object
Authentication type Example: plain
66 67 68 |
# File 'lib/backup/notifier/mail.rb', line 66 def authentication @authentication end |
#delivery_method ⇒ Object
Mail delivery method to be used by the Mail gem. Supported methods:
:smtp [::Mail::SMTP] (default) : Settings used only by this method: : address, port, domain, user_name, password : authentication, enable_starttls_auto, openssl_verify_mode
:sendmail [::Mail::Sendmail] : Settings used only by this method: : sendmail, sendmail_args
:exim [::Mail::Exim] : Settings used only by this method: : exim, exim_args
:file [::Mail::FileDelivery] : Settings used only by this method: : mail_folder
32 33 34 |
# File 'lib/backup/notifier/mail.rb', line 32 def delivery_method @delivery_method end |
#domain ⇒ Object
Your domain (if applicable) Example: mydomain.com
54 55 56 |
# File 'lib/backup/notifier/mail.rb', line 54 def domain @domain end |
#enable_starttls_auto ⇒ Object
Automatically set TLS Example: true
71 72 73 |
# File 'lib/backup/notifier/mail.rb', line 71 def enable_starttls_auto @enable_starttls_auto end |
#exim ⇒ Object
When using the :exim delivery_method option, this may be used to specify the absolute path to exim (if needed) Example: ‘/usr/sbin/exim’
95 96 97 |
# File 'lib/backup/notifier/mail.rb', line 95 def exim @exim end |
#exim_args ⇒ Object
Optional arguments to pass to exim Note that this will override the defaults set by the Mail gem (currently: ‘-i -t’) So, if set here, be sure to set all the arguments you require. Example: ‘-i -t -X/tmp/traffic.log’
102 103 104 |
# File 'lib/backup/notifier/mail.rb', line 102 def exim_args @exim_args end |
#from ⇒ Object
Sender and Receiver email addresses Examples:
sender - my.email.address@gmail.com
receiver - your.email.address@gmail.com
39 40 41 |
# File 'lib/backup/notifier/mail.rb', line 39 def from @from end |
#mail_folder ⇒ Object
Folder where mail will be kept when using the :file delivery_method option. Default location is ‘$HOME/Backup/emails’ Example: ‘/tmp/test-mails’
108 109 110 |
# File 'lib/backup/notifier/mail.rb', line 108 def mail_folder @mail_folder end |
#openssl_verify_mode ⇒ Object
OpenSSL Verify Mode Example: none - Only use this option for a self-signed and/or wildcard certificate
76 77 78 |
# File 'lib/backup/notifier/mail.rb', line 76 def openssl_verify_mode @openssl_verify_mode end |
#password ⇒ Object
Username and Password (sender email’s credentials) Examples:
user_name - meskyanichi
password - my_secret_password
61 62 63 |
# File 'lib/backup/notifier/mail.rb', line 61 def password @password end |
#port ⇒ Object
The port to connect to Example: 587
49 50 51 |
# File 'lib/backup/notifier/mail.rb', line 49 def port @port end |
#sendmail ⇒ Object
When using the :sendmail delivery_method option, this may be used to specify the absolute path to sendmail (if needed) Example: ‘/usr/sbin/sendmail’
82 83 84 |
# File 'lib/backup/notifier/mail.rb', line 82 def sendmail @sendmail end |
#sendmail_args ⇒ Object
Optional arguments to pass to sendmail Note that this will override the defaults set by the Mail gem (currently: ‘-i -t’) So, if set here, be sure to set all the arguments you require. Example: ‘-i -t -X/tmp/traffic.log’
89 90 91 |
# File 'lib/backup/notifier/mail.rb', line 89 def sendmail_args @sendmail_args end |
#to ⇒ Object
Sender and Receiver email addresses Examples:
sender - my.email.address@gmail.com
receiver - your.email.address@gmail.com
39 40 41 |
# File 'lib/backup/notifier/mail.rb', line 39 def to @to end |
#user_name ⇒ Object
Username and Password (sender email’s credentials) Examples:
user_name - meskyanichi
password - my_secret_password
61 62 63 |
# File 'lib/backup/notifier/mail.rb', line 61 def user_name @user_name end |