lib/helpers/mail2wiki-helper.rb in Soks-1.0.2 vs lib/helpers/mail2wiki-helper.rb in Soks-1.0.3
- old
+ new
@@ -13,13 +13,14 @@
def initialize( imap, message_id )
@imap, @message_id = imap, message_id
envelope = @imap.fetch( @message_id, 'ENVELOPE' ).first.attr['ENVELOPE']
@subject = envelope['subject'].gsub(/^(Fw|Re):?/i,'').strip
- @sender_name = envelope['from'].first['name'].gsub(/@/,' at ')
+ @sender_name = envelope['from'].first['name']
@date = envelope['date']
@sender_email = envelope['from'].first['mailbox'] + ' at ' + envelope['from'].first['host']
@sender_name = @sender_email unless @sender_name && @sender_name.size > 1
+ @sender_name.gsub!(/@/,' at ')
@text = plain_text_content_from_message( message_id )
end
def plain_text_content_from_message( id )
@imap.fetch( id, 'BODY[1]' ).first.attr['BODY[1]'].from_quoted_printable
\ No newline at end of file