Forum: Ruby on Rails Bug in TMail ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bd0ecd69dba2aab1a0261ee46e090139?d=identicon&s=25 Nicholas Wieland (Guest)
on 2007-02-24 11:44
(Received via mailing list)
I'm sending mails to a rails app, and I'm having a weird issue
fetching the email.from header.

I will paste the whole email and show what email.from returns.

#######

Received mail:
Return-Path: <nicholas.wieland@gmail.com>
Delivered-To: unknown
Received: from mail.tochunky.org (75.126.89.28) by
adreadedsunnyday.local
   with POP3; 24 Feb 2007 10:36:27 -0000
Envelope-to: test@tochunky.org
Delivery-date: Sat, 24 Feb 2007 04:36:16 -0600
Received: from [66.249.82.229] (helo=wx-out-0506.google.com)
         by dragon.webhostserver.biz with esmtp (Exim 4.63)
         (envelope-from <nicholas.wieland@gmail.com>)
         id 1HKuGG-0001yV-FP
         for test@tochunky.org; Sat, 24 Feb 2007 04:36:16 -0600
Received: by wx-out-0506.google.com with SMTP id s8so769411wxc
         for <test@tochunky.org>; Sat, 24 Feb 2007 02:36:16 -0800 (PST)
DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed;
         d=gmail.com; s=beta;
         h=domainkey-signature:received:received:mime-version:content-
type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer;
         b=FRaSe+IsSyLVmg/
xaZdC9Hrd6WPqfLpiLY8svVGBKjdyLyZ3iXBnURANNEfDGO7kWXN/
2IRBDj2FLMOpEAAgDM7Ph05RN2bi7M+EkOf0gjnk9agwfvszCU69QcWSyDk/K1TxvR/
AyAbxjFW9U9kzOh2YedhjtDJ6oc65beDpfyM=
DomainKey-Signature: a=rsa-sha1; c=nofws;
         d=gmail.com; s=beta;
         h=received:mime-version:content-type:message-id:content-
transfer-encoding:from:subject:date:to:x-mailer;
         b=DH2aTssEzMz8511RwC432sKB7/VVg0
+43OfEKYPE9oZNYzZqm6YgHFTxEOWxVNOABvNG3UOckADXmfeAg/o2Ro9VmzC7mVIb+5uM
+yzZ8/LKkIkAdLkFOZwo30Y5Eu3edTdLJrQn7TRIZczsLd6aVTrRFGMiZ5RvLVVbZUCZo50=
Received: by 10.90.90.16 with SMTP id n16mr2990681agb.1172313376234;
         Sat, 24 Feb 2007 02:36:16 -0800 (PST)
Received: from ?192.168.0.2? ( [87.8.27.195])
         by mx.google.com with ESMTP id 1sm3184655agb.
2007.02.24.02.36.15;
         Sat, 24 Feb 2007 02:36:16 -0800 (PST)
Mime-Version: 1.0 (Apple Message framework v752.2)
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Message-Id: <9DB1A09E-BFEA-424B-878E-C6D636153E87@gmail.com>
Content-Transfer-Encoding: 7bit
From: Nicholas Wieland <nicholas.wieland@gmail.com>
Subject: test4
Date: Sat, 24 Feb 2007 11:36:15 +0100
To: test@tochunky.org
X-Mailer: Apple Mail (2.752.2)

dsajnkjnsakdbkjsabadks
jksadndsksjkknnas

wejkrnwernkejwnrkjwernjk ewh kj r jnwkjernkwejwjkbhrekwjbr jkwb wkej
bkjweb kjrwekj kjr kjwe rkjw ejwbjk rbkjb rkjweb rkwb


######

As you can see it's a normal email, the from header is well formed
(name <email@address.com>).
email.from returns:

'---
- nicholas.wieland@gmail.com
'

I have the same behaviour sending with Mail.app and Gmail.
Am I dramatically missing something here ? Or is it a bug in Tmail/
rails ?

TIA,
   ngw
Bd0ecd69dba2aab1a0261ee46e090139?d=identicon&s=25 Nicholas Wieland (Guest)
on 2007-02-24 13:56
(Received via mailing list)
Il giorno 24/feb/07, alle ore 11:43, Nicholas Wieland ha scritto:

> CUT

Solved, I have to use mail.from.to_s ...
Isn't it a bit weird ?

   ngw
This topic is locked and can not be replied to.