Skip to content

Mail attempts to decode a mail message twice when using exim #814

Closed
@dukha

Description

@dukha

When trying the basic example in the readme with exim, I only received and error:

NoMethodError: undefined method encoded' for #String:0x0000000947f9d8 from /home/mark/.rvm/gems/ruby-2.0.0-p247/gems/mail 2.5.4/lib/mail/network/delivery_methods/exim.rb:46:inblock in call'

The mail message should have been an instance of the Mail class which respond to 'encoded', not a string.

It turns out the encoded is being called twice, once in the super class(Mail::Sendmail) and once in the subclass Mail::Exim.

My fix was to remove encoded from the Mail:Exim

def self.call(path, arguments, destinations, encoded_mail)
   popen "#{path} #{arguments}" do |io|
  io.puts encoded_mail.to_lf
  io.flush
   end
 end

This research was done in 2.5.4, however it looks like it is still in the master on github.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions