trabajo-afectivo/app/models/channel/driver/mail_stdin.rb

21 lines
357 B
Ruby
Raw Normal View History

2014-02-03 19:23:00 +00:00
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
2015-08-28 00:53:14 +00:00
class Channel::Driver::MailStdin < Channel::EmailParser
=begin
process emails from STDIN
cat /path/to/mail.eml | rails r 'Channel::Driver::MailStdin.new'
=end
def initialize
2015-05-04 19:34:04 +00:00
Rails.logger.info 'read main from STDIN'
msg = ARGF.read
2015-12-14 09:23:14 +00:00
process({}, msg)
end
end