Class: Magnesium::Mail
- Inherits:
-
Object
- Object
- Magnesium::Mail
- Defined in:
- lib/magnesium/extensions/mail.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#msg ⇒ Object
Returns the value of attribute msg.
-
#server ⇒ Object
Returns the value of attribute server.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#to ⇒ Object
Returns the value of attribute to.
Class Method Summary collapse
-
.send ⇒ Object
(server,subject,msg,from,to).
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
9 10 11 |
# File 'lib/magnesium/extensions/mail.rb', line 9 def from @from end |
#msg ⇒ Object
Returns the value of attribute msg.
8 9 10 |
# File 'lib/magnesium/extensions/mail.rb', line 8 def msg @msg end |
#server ⇒ Object
Returns the value of attribute server.
6 7 8 |
# File 'lib/magnesium/extensions/mail.rb', line 6 def server @server end |
#subject ⇒ Object
Returns the value of attribute subject.
7 8 9 |
# File 'lib/magnesium/extensions/mail.rb', line 7 def subject @subject end |
#to ⇒ Object
Returns the value of attribute to.
10 11 12 |
# File 'lib/magnesium/extensions/mail.rb', line 10 def to @to end |
Class Method Details
.send ⇒ Object
(server,subject,msg,from,to)
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/magnesium/extensions/mail.rb', line 12 def self.send #(server,subject,msg,from,to) = <<MESSAGE_END From: <#{@from}> To: <#{@to}> Subject: #{@subject} #{@msg} MESSAGE_END Net::SMTP.start('#{@server}') do |smtp| smtp. , '#{@from}', '#{@to}' end end |