Skip to content

Commit

Permalink
If a message's From header is empty, return an empty string instead o…
Browse files Browse the repository at this point in the history
…f nil
  • Loading branch information
dagbrown committed Feb 3, 2015
1 parent f650ae3 commit 328277c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gurgitate/mailmessage.RB
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,12 @@ module Gurgitate
if text
(@headertext,@body)=text.split(/\n\n/m,2)
@headers=MailHeaders.new(@headertext);
Fromregex.match(@headers["From"][0].contents);
Fromregex.match(
if @headers["From"] then
@headers["From"][0].contents
else
""
end);
@from=$+
else
super(text)
Expand Down

0 comments on commit 328277c

Please sign in to comment.