运行 ubuntu 14.04 ruby 2.0 Rails 4 Mail gem 2.5.4
在 Rails 控制台中
mail = Mail.new do
*> from 'me@test.com'
*> to 'mbennon@gmail.com'
*> subject 'Here is the image you wanted'
*> body 'this is a test'
*>end
> mail.delivery_method :exim, :location => "/usr/sbin/exim"
> mail deliver
我收到以下错误(在它进入 exim 之前)
NoMethodError:
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:in
调用中未定义的方法块'
邮件中有一种编码方法。似乎在调用时它只是字符串...