I’m having trouble getting ActionMailer to actually send anything. I
keep getting EOFError and I can’t seem to find anything about it.
Thanks, Shad
environment.rb
Include your app’s configuration here:
ActionMailer::Base.server_settings = {
:address => “smtp.liquidcultures.com”,
:port => 25,
:domain => “www.liquidcultures.com”,
:user_name => “[email protected]”,
:password => “my_password”,
:authentication => :plain
}
mailman.rb
class Mailman < ActionMailer::Base
def mail( email ) # Email header info MUST be added here
@recipients = email
@from = “[email protected]”
@subject = “Thank you for registering with our website”
# Email body substitutions go here
@body["email"] = email
puts "here"
end
end
mail.rhtml
<?xml version="1.0" encoding="utf-8"?> hello, <%= @email %>I run the console and then try:
Mailman.deliver_mail( “[email protected]”)
And get:
EOFError: End of file reached
from
/Applications/Locomotive/Bundles/rails-0.14.1-min.bundle/Contents/Resources/ports/lib/ruby/1.8/net/protocol.rb:197:in
sysread' from /Applications/Locomotive/Bundles/rails-0.14.1-min.bundle/Contents/Resources/ports/lib/ruby/1.8/net/protocol.rb:197:in
rbuf_fill’
from
/Applications/Locomotive/Bundles/rails-0.14.1-min.bundle/Contents/Resources/ports/lib/ruby/1.8/net/protocol.rb:196:in
timeout' from /Applications/Locomotive/Bundles/rails-0.14.1-min.bundle/Contents/Resources/ports/lib/ruby/1.8/timeout.rb:55:in
timeout’
from
/Applications/Locomotive/Bundles/rails-0.14.1-min.bundle/Contents/Resources/ports/lib/ruby/1.8/net/protocol.rb:196:in
rbuf_fill' from /Applications/Locomotive/Bundles/rails-0.14.1-min.bundle/Contents/Resources/ports/lib/ruby/1.8/net/protocol.rb:160:in
readuntil’
(etc.)