Skip to content
This repository was archived by the owner on Mar 19, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/mapi/convert/note-mime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def populate_headers
# headers, i think because one recipient was external. the only place the senders email address
# exists is in the transport headers. so its maybe not good to overwrite from.
# recipients however usually have smtp address available.
# maybe we'll do it for all addresses that are smtp? (is that equivalent to
# maybe we'll do it for all addresses that are smtp? (is that equivalent to
# sender_email_address !~ /^\//
name, email = props.sender_name, props.sender_email_address
if props.sender_addrtype == 'SMTP'
Expand Down Expand Up @@ -105,7 +105,7 @@ def populate_headers
# i have no timezone info anyway.
# in gmail, i see stuff like 15 Jan 2007 00:48:19 -0000, and it displays as 11:48.
# can also add .localtime here if desired. but that feels wrong.
headers['Date'] = [Time.iso8601(time.to_s).rfc2822] if time
headers['Date'] = [time.rfc2822] if time
end

# some very simplistic mapping between internet message headers and the
Expand Down Expand Up @@ -266,9 +266,8 @@ def populate_headers
# can employ other methods for getting a time. heres one in a similar vein to msgconvert.pl,
# ie taking the time from an ole object
time = @root.ole.dirents.map { |dirent| dirent.modify_time || dirent.create_time }.compact.sort.last
headers['Date'] = [Time.iso8601(time.to_s).rfc2822] if time
headers['Date'] = [time.rfc2822] if time
end
end
end
end

7 changes: 3 additions & 4 deletions lib/mapi/convert/note-tmail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def populate_headers
# headers, i think because one recipient was external. the only place the senders email address
# exists is in the transport headers. so its maybe not good to overwrite from.
# recipients however usually have smtp address available.
# maybe we'll do it for all addresses that are smtp? (is that equivalent to
# maybe we'll do it for all addresses that are smtp? (is that equivalent to
# sender_email_address !~ /^\//
name, email = props.sender_name, props.sender_email_address
if props.sender_addrtype == 'SMTP'
Expand Down Expand Up @@ -115,7 +115,7 @@ def populate_headers
# i have no timezone info anyway.
# in gmail, i see stuff like 15 Jan 2007 00:48:19 -0000, and it displays as 11:48.
# can also add .localtime here if desired. but that feels wrong.
headers['Date'] = [Time.iso8601(time.to_s).rfc2822] if time
headers['Date'] = [time.rfc2822] if time
end

# some very simplistic mapping between internet message headers and the
Expand Down Expand Up @@ -279,9 +279,8 @@ def populate_headers
# can employ other methods for getting a time. heres one in a similar vein to msgconvert.pl,
# ie taking the time from an ole object
time = @root.ole.dirents.map { |dirent| dirent.modify_time || dirent.create_time }.compact.sort.last
headers['Date'] = [Time.iso8601(time.to_s).rfc2822] if time
headers['Date'] = [time.rfc2822] if time
end
end
end
end