summaryrefslogtreecommitdiff
path: root/lib/feed2imap
diff options
context:
space:
mode:
Diffstat (limited to 'lib/feed2imap')
-rw-r--r--lib/feed2imap/itemtomail.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/feed2imap/itemtomail.rb b/lib/feed2imap/itemtomail.rb
index fcf8f8b..455a136 100644
--- a/lib/feed2imap/itemtomail.rb
+++ b/lib/feed2imap/itemtomail.rb
@@ -99,7 +99,8 @@ def item_to_mail(config, item, id, updated, from = 'Feed2Imap', inline_images =
htmlpart.body.gsub!(/(<img[^>]+)src="(\S+?\/([^\/]+?\.(png|gif|jpe?g)))"([^>]*>)/i) do |match|
# $2 contains url, $3 the image name, $4 the image extension
begin
- image = Base64.encode64(HTTPFetcher::fetch($2, Time.at(0)).chomp) + "\n"
+ fetcher = HTTPFetcher.new
+ image = Base64.encode64(fetcher.fetch($2, Time.at(0)).chomp) + "\n"
cid = "#{Digest::MD5.hexdigest($2)}@#{config.hostname}"
if not cids.include?(cid)
cids << cid