tmail

Correct format of an Return-Path header

My application uses sendmail to send outbound email. I set the 'From:' address using the following format: Fred Dibnah <[email protected]> I'm also setting the Reply-To and Return-Path headers using the exact same format. This seems to work in the vast majority of cases but I have seen at least one instance in which this fails, name...

Ruby TMail size-limit on body?

I have a small application that process emails as downloaded from a imap-server with fetchmail. The processing consists of finding base64-encoded attachments with a XML-file inside. Here is the code (somewhat stripped): def extract_data_from_mailfile(mailfile) begin mail = TMail::Mail.load(mailfile) rescue return nil...

Ruby email encoding and quoted-printable content

Is there a straightforward way to coach TMail to make the body encoded with "quoted-printable"? I only see methods in there for decoding content like that, not creating it. ...

Ruby and Tmail; Hostname of relaying server?

I am using Ruby and Tmail to retrieve a series of emails from the server. Is there any way to determine the hostname of the server that relayed the email message? ...

Saving GMAIL Attachment as 'Subject - (Date of message)' using ruby

I am trying to incorporate this script here (http://snippets.dzone.com/posts/show/7530), yet i'm no ruby wizard. Right now it pulls down mail that I want with the local_file name, but was wondering if its possible to have it pull it down and save it by the 'message subject title + date of message'. When I try using mail.date, I get a lo...

Problem including gems in Rails 2.3?

My Rails app uses the TMail plugin, but it requires a modification to Attachment.rb. The modification is recognized and loaded by Rails on my development machine, but in the production environment on my hosting provider (Rails Playground), the system version of TMail is loaded and not our custom version. Online document about the best ...

MMS2R and Multiple Images Rails

Here's my code: require 'mms2r' class IncomingMailHandler < ActionMailer::Base ## # Receives email(s) from MMS-Email or regular email and # uploads that content the user's photos. # TODO: Use beanstalkd for background queueing and processing. def receive(email) begin mms = MMS2R::Media.new(email) ## # Ok to fi...

Problem with fetching mail using TMail in Ruby on Rails

While fetching email, TMail appears to parse the email body twice,when I use this code.All the other parameters are fine(from_email,email_subject). Any ideas? def get_mail Net::POP3.enable_ssl(OpenSSL::SSL::VERIFY_NONE) Net::POP3.start('pop.gmail.com', 995, "uname","pass") do |pop| mail_header=[];mail_subject=[];mail_body=[];m...

Trying to set the message-id, in-reply-to, etc... in ActionMailer

I'm working on an app that needs to be able to send out email updates and then route the reply back to the original item. All emails will come to a single address (this can't change unfortunately), and I need to be able to determine where they go. My initial thought was setting the message-id for the item so that it comes back as a Ref...

Ruby Tmail error: undefined symbol: rb_get_kcode

ruby: symbol lookup error: /usr/local/lib/ruby/gems/1.9.1/gems/tmail-1.2.7.1/ext/tmailscanner/tmail/tmailscanner.so: undefined symbol: rb_get_kcode strange error that crash app. ruby 1.9.1 rails 2.3.8 tmail 1.2.7 ...