Sha256: e0484e2a8cac9c8cdc30736547b58d2bb1dec93b8fef007cb21931c203f4765e

Contents?: true

Size: 1.24 KB

Versions: 20

Compression:

Stored size: 1.24 KB

Contents

2/23/2010
Version 2.4.1 of MMS2R is the last TMail based MMS2R.  TMail
http://tmail.rubyforge.org/ has been deemed to be a legacy gem and the most
RFC compliant Ruby gem for everything email related is now Mail
http://github.com/mikel/mail .  I may back-port configuration settings to the
old MMS2R code base which will live in the legacy_tmail_branch branch and
publish point releases for 2.4.X.  But I may not so don't count on it.  Version
3.0.0 of MMS2R will be the master branch going forward and will be dependent on
the Mail gem.
Thank you
Mike

7/24/2010
If you want to use Mail instead of TMail in an Rails 2.3 or lower ActionMailer
this is one way to do it:

http://gist.github.com/486883


class MailReceiver < ActionMailer::Base

  # patch ActionMailer::Base to put a ActionMailer::Base#raw_email 
  # accessor on the created instance
  class << self
    alias :old_receive :receive
    def receive(raw_email)
      send(:define_method, :raw_email) { raw_email }
      self.old_receive(raw_email)
    end
  end

  ##
  # Injest email/MMS here

  def receive(tmail)
    # completely ignore the tmail object rails passes in Rails 2.*

    mail = Mail.new(self.raw_email)
    mms = MMS2R::Media.new(mail, :logger => Rails.logger)

    # do something
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
mms2r-3.9.2 README.TMail.txt
mms2r-3.9.1 README.TMail.txt
mms2r-3.9.0 README.TMail.txt
mms2r-3.8.2 README.TMail.txt
mms2r-3.8.1 README.TMail.txt
mms2r-3.8.0 README.TMail.txt
mms2r-3.7.1 README.TMail.txt
mms2r-3.7.0 README.TMail.txt
mms2r-3.6.4 README.TMail.txt
mms2r-3.6.3 README.TMail.txt
mms2r-3.6.2 README.TMail.txt
mms2r-3.6.1 README.TMail.txt
mms2r-3.6.0 README.TMail.txt
mms2r-3.5.1 README.TMail.txt
mms2r-3.5.0 README.TMail.txt
mms2r-3.4.1 README.TMail.txt
mms2r-3.4.0 README.TMail.txt
mms2r-3.3.1 README.TMail.txt
mms2r-3.3.0 README.TMail.txt
mms2r-3.2.0 README.TMail.txt