Adding some more information:
OS: Microsoft Windows Server 2003 R2, Standard Edition, Service Pack 2
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
tmail (1.2.3.1)
On Wed, Nov 26, 2008 at 14:43, ?eljko Filipin <zeljko.filipin at
gmail.com>wrote:
> Hi,
>
> I am inspecting all headers of a mail (it is attached as mail.eml):
>
>
> irb(main):001:0> require ''tmail''
> => true
> irb(main):002:0> mail = TMail::Mail.load "mail.eml"
> => #<TMail::Mail port=#<TMail::FilePort:C:/Documents and
> Settings/Administrator/Desktop/mail.eml> bodyport=nil>
> ...
> irb(main):021:0> mail.each_header { |header, value| puts "#{header}
> #{value}" }
> x-originalarrivaltime = 26 Nov 2008 12:32:26.0649 (UTC)
> FILETIME=[0A483090:01C94FC3]
> message-id = <bc3c4c3b-a0b3-47fc-a490-cfae3b0c8eb0 at 1.ecs.local>
> reply-to = community title <community_url at 1.ecs.local>
> thread-topic = [community_url] discussion title
> mime-version = 1.0
> x-ecs-notification = yes
> date = Wed, 26 Nov 2008 13:32:26 +0100
> content-type = multipart/alternative;
> boundary=mimepart_492d4dfccc588_4e414263a42dd
> from = Member-1 ECS <Member-1.ECS at 1.users.local>
> priority = normal
> thread-index = AclPwwpFsbP3/gTxQnW3+VbCjC3GxQ=> x-receiver =
Leader-1.ECS at 1.users.local
> subject = [community_url] discussion title
> to = community title <community_url at 1.ecs.local>
> received > content-class = urn:content-classes:message
> x-mimeole = Produced By Microsoft MimeOLE V6.00.3790.4325
> importance = normal
> list-id = "community title" <community_url.1.ecs.local>
> x-sender >
bc3c4c3b-a0b3-47fc-a490-cfae3b0c8eb0=community_url=Leader-1.ECS=1.users.local at
1.ecs.local
> ...
>
>
> Please notice that header "received" has empty value. It is not
empty in
> mail:
>
>
> Received: from mail pickup service by win2003-mac-3-trunk with Microsoft
> SMTPSVC;
> Wed, 26 Nov 2008 13:32:26 +0100
>
> If I do value.inspect it is not empty:
>
>
> irb(main):024:0> mail.each_header { |header, value| puts "#{header}
> #{value.inspect}" }
> ...
> to = #<TMail::AddressHeader "\"community title\"
<community_url at 1.ecs.local
> >\n">
> received = #<TMail::ReceivedHeader "from mail pickup service by
> win2003-mac-3-trunk with Microsoft SMTPSVC;\n Wed, 26 Nov 2008 13:32:26
> +0100">
> content-class = #<TMail::UnstructuredHeader
"urn:content-classes:message">
> ...
>
>
> For some reason to_s returns empty string for "received" header:
>
> irb(main):025:0> mail["received"]
> => [#<TMail::ReceivedHeader "from mail pickup service by
> win2003-mac-3-trunk with Microsoft SMTPSVC;\n Wed, 26 Nov 2008 13:32:26
> +0100">]
> irb(main):026:0> mail["received"].to_s
> => ""
>
>
> but to_s does not return emtpy string for other headers:
>
>
> irb(main):031:0> mail["content-type"]
> => #<TMail::ContentTypeHeader "multipart/alternative;\n
> boundary=\"----=_NextPart_000_0066_01C94FCB.6C0A4EA0\"">
> irb(main):033:0> mail["content-type"].to_s
> => "multipart/alternative;
boundary=mimepart_492d4dfccc588_4e414263a42dd"
>
>
> Anybody has an idea what went wrong?
>
> Thanks,
>
> ?eljko Filipin
> --
> http://zeljkofilipin.com/
> http://watirpodcast.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/tmail-talk/attachments/20081208/095a8dd7/attachment-0001.html>