nuntius 1.2.0 → 1.2.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79443fa45e4f41933706a15077cd652aa9bbb323a217f608e594380a7c8c8759
|
4
|
+
data.tar.gz: 84f7d913569bf6dff0f2ee2cecb9e61119972082adea8b944a52b726799265d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcb1f10966488947cbf7e6d7dcbaa53485f04174eab8abccfeef8cdec135838245775e6c0101068996f9189d13d11893718ee0545a5aa309695cce9718ffab45
|
7
|
+
data.tar.gz: 8a2d19bc4fc4834ca57021da55f1dfdece9bc6dda9fd538b1b0bc37b9fc62e116cde27814f34ea9ea2fc75835dc2dd45ea3a3edc5d389aeb1cfde8be92d1f19c
|
data/README.md
CHANGED
@@ -281,8 +281,10 @@ class BarMessageBox < Nuntius::BaseMessageBox
|
|
281
281
|
route to: :process
|
282
282
|
|
283
283
|
def process
|
284
|
-
puts message.status #
|
285
|
-
puts mail.to
|
284
|
+
puts message.status # message is Nuntius's inbound message.
|
285
|
+
puts mail.to # mail gives you the Mail representation, when it's a mail (transport)
|
286
286
|
end
|
287
287
|
end
|
288
288
|
```
|
289
|
+
|
290
|
+
Add `Nuntius::RetrieveMailJob` to your cron.
|
@@ -11,7 +11,8 @@ module Nuntius
|
|
11
11
|
setting_reader :port, required: true, description: "Port (example: 578)"
|
12
12
|
setting_reader :username, required: true, description: "Username (nuntius@entdec.com)"
|
13
13
|
setting_reader :password, required: true, description: "Password"
|
14
|
-
setting_reader :allow_list, required: false, default: [], description: "Allow list (example: [
|
14
|
+
setting_reader :allow_list, required: false, default: [], description: "Allow list (example: [example.com, tim@apple.com])"
|
15
|
+
setting_reader :ssl, required: false, default: false, description: "Whether to use SSL or not"
|
15
16
|
|
16
17
|
def deliver
|
17
18
|
return block unless MailAllowList.new(settings[:allow_list]).allowed?(message.to)
|
@@ -31,7 +32,8 @@ module Nuntius
|
|
31
32
|
port: port,
|
32
33
|
user_name: username,
|
33
34
|
password: password,
|
34
|
-
return_response: true
|
35
|
+
return_response: true,
|
36
|
+
ssl: ssl
|
35
37
|
end
|
36
38
|
|
37
39
|
mail.to = message.to
|
@@ -7,13 +7,22 @@ module Nuntius
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def perform
|
10
|
-
|
10
|
+
settings = context.settings
|
11
|
+
settings.merge!(address: context.settings[:host],
|
12
|
+
port: context.settings[:port],
|
13
|
+
enable_ssl: context.settings[:enable_ssl],
|
14
|
+
user_name: context.settings[:username],
|
15
|
+
password: context.settings[:password])
|
16
|
+
Mail::IMAP.new(settings).all do |message, imap, uid|
|
11
17
|
inbound_message = Nuntius::InboundMessage.find_or_initialize_by(transport: "mail", provider: "imap", provider_id: message.message_id)
|
12
18
|
if inbound_message.new_record?
|
13
19
|
inbound_message.digest = Digest::SHA256.hexdigest(message.to_s)
|
14
20
|
inbound_message.from = message.from
|
15
21
|
inbound_message.to = message.to
|
16
|
-
inbound_message.
|
22
|
+
inbound_message.cc = message.cc
|
23
|
+
inbound_message.text = message.text_part&.decoded
|
24
|
+
inbound_message.html = message.html_part&.decoded
|
25
|
+
inbound_message.subject = message.subject
|
17
26
|
inbound_message.save!
|
18
27
|
|
19
28
|
si = StringIO.new
|
data/lib/nuntius/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nuntius
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom de Grunt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apnotic
|