Class: Backup::Configuration::Notifier::Mail

Inherits:
Base
  • Object
show all
Defined in:
lib/backup/configuration/notifier/mail.rb

Class Attribute Summary collapse

Method Summary

Methods inherited from Base

defaults

Methods included from Helpers

#clear_defaults!, #load_defaults!

Class Attribute Details

.addressObject

The address to use Example: smtp.gmail.com



42
43
44
# File 'lib/backup/configuration/notifier/mail.rb', line 42

def address
  @address
end

.authenticationObject

Authentication type Example: plain



64
65
66
# File 'lib/backup/configuration/notifier/mail.rb', line 64

def authentication
  @authentication
end

.delivery_methodObject

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



30
31
32
# File 'lib/backup/configuration/notifier/mail.rb', line 30

def delivery_method
  @delivery_method
end

.domainObject

Your domain (if applicable) Example: mydomain.com



52
53
54
# File 'lib/backup/configuration/notifier/mail.rb', line 52

def domain
  @domain
end

.enable_starttls_autoObject

Automatically set TLS Example: true



69
70
71
# File 'lib/backup/configuration/notifier/mail.rb', line 69

def enable_starttls_auto
  @enable_starttls_auto
end

.eximObject

When using the :exim delivery_method option, this may be used to specify the absolute path to exim (if needed) Example: ‘/usr/sbin/exim’



93
94
95
# File 'lib/backup/configuration/notifier/mail.rb', line 93

def exim
  @exim
end

.exim_argsObject

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’



100
101
102
# File 'lib/backup/configuration/notifier/mail.rb', line 100

def exim_args
  @exim_args
end

.fromObject

Sender and Receiver email addresses Examples:

sender   - my.email.address@gmail.com
receiver - your.email.address@gmail.com


37
38
39
# File 'lib/backup/configuration/notifier/mail.rb', line 37

def from
  @from
end

.mail_folderObject

Folder where mail will be kept when using the :file delivery_method option. Default location is ‘$HOME/backup-mails’ Example: ‘/tmp/test-mails’



106
107
108
# File 'lib/backup/configuration/notifier/mail.rb', line 106

def mail_folder
  @mail_folder
end

.openssl_verify_modeObject

OpenSSL Verify Mode Example: none - Only use this option for a self-signed and/or wildcard certificate



74
75
76
# File 'lib/backup/configuration/notifier/mail.rb', line 74

def openssl_verify_mode
  @openssl_verify_mode
end

.passwordObject

Username and Password (sender email’s credentials) Examples:

user_name - meskyanichi
password  - my_secret_password


59
60
61
# File 'lib/backup/configuration/notifier/mail.rb', line 59

def password
  @password
end

.portObject

The port to connect to Example: 587



47
48
49
# File 'lib/backup/configuration/notifier/mail.rb', line 47

def port
  @port
end

.sendmailObject

When using the :sendmail delivery_method option, this may be used to specify the absolute path to sendmail (if needed) Example: ‘/usr/sbin/sendmail’



80
81
82
# File 'lib/backup/configuration/notifier/mail.rb', line 80

def sendmail
  @sendmail
end

.sendmail_argsObject

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’



87
88
89
# File 'lib/backup/configuration/notifier/mail.rb', line 87

def sendmail_args
  @sendmail_args
end

.toObject

Sender and Receiver email addresses Examples:

sender   - my.email.address@gmail.com
receiver - your.email.address@gmail.com


37
38
39
# File 'lib/backup/configuration/notifier/mail.rb', line 37

def to
  @to
end

.user_nameObject

Username and Password (sender email’s credentials) Examples:

user_name - meskyanichi
password  - my_secret_password


59
60
61
# File 'lib/backup/configuration/notifier/mail.rb', line 59

def user_name
  @user_name
end