diff options
author | lnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972> | 2006-02-13 20:10:47 +0000 |
---|---|---|
committer | lnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972> | 2006-02-13 20:10:47 +0000 |
commit | 5ecbe2229878fcabeaca1defe7a7c4a3d4014c50 (patch) | |
tree | 213318763d4efd1c3166508c603d61e122411bea | |
parent | 47021b0367be82aed207ccc2a6137882d9c93398 (diff) | |
download | feed2imap-5ecbe2229878fcabeaca1defe7a7c4a3d4014c50.tar.gz feed2imap-5ecbe2229878fcabeaca1defe7a7c4a3d4014c50.tar.bz2 feed2imap-5ecbe2229878fcabeaca1defe7a7c4a3d4014c50.zip |
From = author(post)
git-svn-id: svn+ssh://svn.gna.org/svn/feed2imap/trunk/feed2imap@84 f70e237a-67f3-0310-a06c-d2b8a7116972
-rw-r--r-- | lib/feed2imap/itemtomail.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/feed2imap/itemtomail.rb b/lib/feed2imap/itemtomail.rb index 9d1cbad..f2c5616 100644 --- a/lib/feed2imap/itemtomail.rb +++ b/lib/feed2imap/itemtomail.rb @@ -43,8 +43,15 @@ end def item_to_mail(item, index, updated, from = 'Feed2Imap') message = RMail::Message::new - message.header['From'] = "#{from} <feed2imap@feed2imap.net>" - message.header['To'] = "#{from} <feed2imap@feed2imap.net>" + if item.creator and item.creator != '' + if item.creator.include?('@') + message.header['From'] = item.creator.chomp + else + message.header['From'] = "#{item.creator.chomp} <feed2imap@acme.com>" + end + else + message.header['To'] = "#{from} <feed2imap@acme.com>" + end if @date.nil? message.header['Date'] = Time::new.rfc2822 else |