Class: MailHandler::Sending::SMTPSender
- Defined in:
- lib/mailhandler/sending/smtp.rb
Overview
class which describes methods to send and receive emails
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#authentication ⇒ Object
Returns the value of attribute authentication.
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#password ⇒ Object
Returns the value of attribute password.
-
#port ⇒ Object
Returns the value of attribute port.
-
#use_ssl ⇒ Object
Returns the value of attribute use_ssl.
-
#username ⇒ Object
Returns the value of attribute username.
Attributes inherited from Sender
Instance Method Summary collapse
-
#initialize ⇒ SMTPSender
constructor
A new instance of SMTPSender.
- #send(email) ⇒ Object
Constructor Details
#initialize ⇒ SMTPSender
Returns a new instance of SMTPSender.
20 21 22 23 24 25 26 |
# File 'lib/mailhandler/sending/smtp.rb', line 20 def initialize @type = :smtp @authentication = 'plain' @use_ssl = false end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
12 13 14 |
# File 'lib/mailhandler/sending/smtp.rb', line 12 def address @address end |
#authentication ⇒ Object
Returns the value of attribute authentication.
12 13 14 |
# File 'lib/mailhandler/sending/smtp.rb', line 12 def authentication @authentication end |
#domain ⇒ Object
Returns the value of attribute domain.
12 13 14 |
# File 'lib/mailhandler/sending/smtp.rb', line 12 def domain @domain end |
#password ⇒ Object
Returns the value of attribute password.
12 13 14 |
# File 'lib/mailhandler/sending/smtp.rb', line 12 def password @password end |
#port ⇒ Object
Returns the value of attribute port.
12 13 14 |
# File 'lib/mailhandler/sending/smtp.rb', line 12 def port @port end |
#use_ssl ⇒ Object
Returns the value of attribute use_ssl.
12 13 14 |
# File 'lib/mailhandler/sending/smtp.rb', line 12 def use_ssl @use_ssl end |
#username ⇒ Object
Returns the value of attribute username.
12 13 14 |
# File 'lib/mailhandler/sending/smtp.rb', line 12 def username @username end |
Instance Method Details
#send(email) ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/mailhandler/sending/smtp.rb', line 28 def send(email) verify_email(email) email = configure_sending(email) email.deliver end |