lib/messenger/email.rb in messenger-0.0.2 vs lib/messenger/email.rb in messenger-0.0.3
- old
+ new
@@ -1,6 +1,6 @@
-require 'pony'
+require 'mail'
module Messenger
class Email
@@ -9,15 +9,16 @@
#
# Options:
# :email_from => Who the email is from
# :email_subject => The subject of the email
def self.send(url, message, options={})
- Pony.mail(
- :to => url.sub(/mailto:/, ''),
- :from => options[:email_from],
- :subject => options[:email_subject],
- :body => message
- )
+ mail = Mail.new do
+ from options[:email_from]
+ to url.sub(/mailto:/, '')
+ subject options[:email_subject]
+ body message
+ end
+ mail.deliver!
[true, nil]
end
end