Class: Forcast::Utils::Email::DefaultServer

Inherits:
Object
  • Object
show all
Defined in:
lib/forcast/utils/email.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ DefaultServer

Returns a new instance of DefaultServer.

Yields:

  • (_self)

Yield Parameters:



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/forcast/utils/email.rb', line 12

def initialize
  yield(self)
  ActionMailer::Base.raise_delivery_errors = true
  ActionMailer::Base.smtp_settings = {
    address:               self.address,
    port:                  self.port.to_i,
    user_name:             self.user_name,
    password:              self.password,
    authentication:        "plain",
    enable_starttls_auto:  true
  }
end

Instance Attribute Details

#addressObject

Returns the value of attribute address.



7
8
9
# File 'lib/forcast/utils/email.rb', line 7

def address
  @address
end

#passwordObject

Returns the value of attribute password.



10
11
12
# File 'lib/forcast/utils/email.rb', line 10

def password
  @password
end

#portObject

Returns the value of attribute port.



8
9
10
# File 'lib/forcast/utils/email.rb', line 8

def port
  @port
end

#user_nameObject

Returns the value of attribute user_name.



9
10
11
# File 'lib/forcast/utils/email.rb', line 9

def user_name
  @user_name
end