I’m trying to use ActionMailer without rails. Perhaps I’m tired, but I
am
quite confused by the following:
irb(main):001:0> require ‘action_mailer’
=> true
irb(main):002:0>
irb(main):003:0* class Emailer < ActionMailer::Base
irb(main):004:1> def initialize
irb(main):005:2> super()
irb(main):006:2> end
irb(main):007:1> end
=> nil
irb(main):008:0> email = Emailer.new
=> nil
Why am I getting nil out of that statement (it’s not just irb, I
checked)?
I’ve found the documentation at:
http://api.rubyonrails.com/classes/ActionMailer/Base.html#M000291
http://am.rubyonrails.org/
But I’m still at a loss.
On Nov 19, 2005, at 11:20 PM, Kevin B. wrote:
I’m trying to use ActionMailer without rails. Perhaps I’m tired,
but I am
quite confused by the following:
You’ll get the fastest, best answers on the Rails mailing list:
http://lists.rubyonrails.org/mailman/listinfo/rails
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Nov 19, 2005, at 11:20 PM, Kevin B. wrote:
I’m trying to use ActionMailer without rails. Perhaps I’m tired,
but I am
quite confused by the following:
Follow the example code at the top of
Peak Obsession
A condensed example:
require ‘action_mailer’
class Emailer < ActionMailer::Base
def test_email(user_email)
subject “Free C1Alis”
from “[email protected]”
recipients user_email
body “Get large, #{user_email}!@”
end
end
Emailer.deliver_test_email(‘[email protected]’)
Delivery is via SMTP @ localhost by default.
Kindly take further Rails-specific discussion to the Rails list.
The Ruby list is mighty busy and Rails chatter decreases its S/N.
Best,
jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)
iD8DBQFDgDTTAQHALep9HFYRAiwLAJ9k12/qlnOTvHFuxdkrR4rqsxMuFACgrQWz
7nd1WtzgK5KoMrw/vYTL8D0=
=Hccn
-----END PGP SIGNATURE-----