danchoi/vmail — Issue #67: From field with angle bracket
Author: ablondin
Created: 2012-01-01 07:24:47+00:00
State: open

Hi!

I've been struggling with sending emails through vmail. Everything works fine except when I try to send emails. I found out that the reason for that is that I shouldn't have angle brackets in the "from" field, which raises an exception. Here's what I get on my MacBookPro with Snow Leopard
alexandreblondinmasse [~]
$ vmailsend < compose_message.txt
/opt/local/lib/ruby1.9/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
Using config file .vmailrc
D, [2012-01-01T02:22:34.888057 #68799] DEBUG -- : from:"Alexandre Blondin Massé "
D, [2012-01-01T02:22:34.888216 #68799] DEBUG -- : to:alexandre.blondin.masse@gmail.com
D, [2012-01-01T02:22:34.888315 #68799] DEBUG -- : subject:Test
D, [2012-01-01T02:22:34.906024 #68799] DEBUG -- : Delivering message with headers: ---
from: ! '"Alexandre Blondin Massé "'
to: alexandre.blondin.masse@gmail.com
subject: Test

/opt/local/lib/ruby1.9/1.9.1/net/smtp.rb:948:in `check_response': 555 5.5.2 Syntax error. ev2sm36327570qab.15 (Net::SMTPFatalError)
from /opt/local/lib/ruby1.9/1.9.1/net/smtp.rb:917:in `getok'
from /opt/local/lib/ruby1.9/1.9.1/net/smtp.rb:832:in `mailfrom'
from /opt/local/lib/ruby1.9/1.9.1/net/smtp.rb:659:in `send_message'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/mail-2.3.0/lib/mail/network/delivery_methods/smtp.rb:129:in `block in deliver!'
from /opt/local/lib/ruby1.9/1.9.1/net/smtp.rb:520:in `start'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/mail-2.3.0/lib/mail/network/delivery_methods/smtp.rb:128:in `deliver!'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/mail-2.3.0/lib/mail/message.rb:245:in `deliver!'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/vmail-2.4.5/lib/vmail/imap_client.rb:347:in `deliver'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/vmail-2.4.5/lib/vmail/sender.rb:12:in `send'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/vmail-2.4.5/bin/vmailsend:10:in `'
from /opt/local/bin/vmailsend:19:in `load'
from /opt/local/bin/vmailsend:19:in `

'

The issue is already known and has already been discussed here
http://stackoverflow.com/questions/1512004/smtp-error-with-rails-exception-notifier-plugin

Is this issue known from you? What would be the best way to deal with it with vmail ? I guess I could look in the ruby scripts or vim scripts, but I would rather avoid it if possible...

Thank you!

Alexandre Blondin Massé