mailhandler 1.0.39 → 1.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7110dbb8ad938a31bdb9b4364e2cca1938aa1c9db573fc71acc00381946104a3
4
- data.tar.gz: 60f583b519a3794cbca7c0efabc396808754557875c345d763d0fb28c9e182f7
3
+ metadata.gz: 056b228a9163d9d2e26aa005ad101f967e2e1cc39bd8fd1b4b9dbafc4c393313
4
+ data.tar.gz: 411d6e1d41d53a14e90e4293e0092dfa0bca01511c17ef4138879a2770079aef
5
5
  SHA512:
6
- metadata.gz: 4a2af60b8ace6be532020704039cd57e38cc9a01af02fd0677936c96fc36fdc427c6836b958d91ad2786d0701880464702c563f8f44e032b4827b714193af6c7
7
- data.tar.gz: 268ce1771328c25865e6c3059faf4411326f139170956a3be3a476330037ec712597fa5308390b93dc02769af047b0e339cccbfc8beaba0810b1d59cdfa4a5ef
6
+ metadata.gz: db5f404afdc20afd7f494f4128ed2992bbcdb1586d6db9ec225682daedf48ff27b98a95588e608b131cc87321877794cfd69d819c2a6087cbede64331670cc9e
7
+ data.tar.gz: 4c0d31bcdb4edb78198c85c2ca3d60f6562b0694ec7c79e156c5a4137a32e86af1b0a97cd38212f26e5f7946c8b5f9ad70131c0587b8221a69a79424ff79b805
@@ -3,6 +3,9 @@ module Mail
3
3
  class IMAP
4
4
  attr_accessor :imap_connection
5
5
 
6
+ # fetch emails with different flag, to make it work with icloud
7
+ FETCH_EMAIL_FLAG = "BODY[]" #"RFC822"
8
+
6
9
  def find_emails(options = {}, &block) # rubocop:disable all
7
10
  options = validate_options(options)
8
11
  options[:read_only] ? imap_connection.examine(options[:mailbox]) : imap_connection.select(options[:mailbox])
@@ -36,8 +39,8 @@ module Mail
36
39
 
37
40
  uids.each do |uid|
38
41
  uid = options[:uid].to_i unless options[:uid].nil?
39
- fetchdata = imap_connection.uid_fetch(uid, ['RFC822'])[0]
40
- emails << Mail.new(fetchdata.attr['RFC822'])
42
+ fetchdata = imap_connection.uid_fetch(uid, [FETCH_EMAIL_FLAG])[0]
43
+ emails << Mail.new(fetchdata.attr[FETCH_EMAIL_FLAG])
41
44
  imap_connection.uid_store(uid, '+FLAGS', [Net::IMAP::DELETED]) if options[:delete_after_find]
42
45
  break unless options[:uid].nil?
43
46
  end
@@ -1,3 +1,3 @@
1
1
  module MailHandler
2
- VERSION = '1.0.39'.freeze
2
+ VERSION = '1.0.40'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailhandler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.39
4
+ version: 1.0.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Balos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-16 00:00:00.000000000 Z
11
+ date: 2019-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mail
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  - !ruby/object:Gem::Version
115
115
  version: 1.9.3
116
116
  requirements: []
117
- rubygems_version: 3.0.1
117
+ rubygems_version: 3.0.6
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: Postmark email receiving and sending handler.