working through 14.5 and getting an awesome openssl error
This commit is contained in:
parent
e69ebabc5f
commit
5de7f2bd3a
24
cookbook/014/05.rb
Normal file
24
cookbook/014/05.rb
Normal file
@ -0,0 +1,24 @@
|
||||
require 'rubygems'
|
||||
require 'action_mailer'
|
||||
|
||||
|
||||
class SimpleMailer < ActionMailer::Base
|
||||
def simple_message(recipient)
|
||||
from 'dan@meatballhat.com'
|
||||
recipients recipient
|
||||
subject 'A single-part message for you'
|
||||
body 'This message has a plain text body.'
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
puts 'generated message:'
|
||||
puts SimpleMailer.simple_message('me@localhost')
|
||||
|
||||
ActionMailer::Base.sendmail_settings = {
|
||||
:address => 'localhost',
|
||||
:port => 25,
|
||||
:domain => 'localhost'
|
||||
}
|
||||
|
||||
SimpleMailer.simple_message('me@localhost').deliver
|
Loading…
Reference in New Issue
Block a user