Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[ANN] RhizMail 0.1.0

0 views
Skip to first unread message

Francis Hwang

unread,
Mar 19, 2005, 2:55:10 PM3/19/05
to
Hi all,

I've just released RhizMail 0.1.0.

http://rhizmail.rubyforge.org/

== WHAT'S RHIZMAIL? ==
RhizMail is a test-friendly library for sending out customized emails.
This is the library we use day-to-day at rhizome.org, where we send out
more than 100 customized emails a day.

To use RhizMail, create an email and deliver it.

def send_site_message( to_address, to_name, body )
msg = RhizMail::Message.new(
'New features at website.com', to_address, 'webm...@mysite.com',
body
)
msg.to_name = to_name
msg.deliver
end

If you want to test this message, you can set the MockMailer to take
place of the default Mailer:

def test_send_site_message
mock_mailer = RhizMail::MockMailer.new
RhizMail::set_mailer mock_mailer
send_site_message( 'bi...@yahoo.com', 'Bill Smith', 'Hi, Bill!' )
assert_equal( 1, mock_mailer.messages_sent )
assert_equal( 'Bill Smith', mock_mailer.messages_sent.first.to_name
)
end

Basically, this means that you can send out as many emails as you want
in any part of your code, without having to worry that running a test
case will actually send out real emails. (Is there somebody who really
has the email address with 'bi...@yahoo.com'? If so, it'd be nice not to
annoy him.)

Francis Hwang
http://fhwang.net/

0 new messages