appmail-rails 0.0.1
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 +7 -0
- data/lib/app_mail/rails/action_mailer_delivery_method.rb +31 -0
- data/lib/app_mail/rails/version.rb +5 -0
- data/lib/appmail-rails.rb +6 -0
- metadata +67 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a8729fece16dfea3925dfae0d93caa9934edb246
|
4
|
+
data.tar.gz: aa120c57426f6fce905ab078955864c11db9f713
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b398710e143d123abf007aa035db1542ffc7ba1094f04cf4b2100911bc3a6fd59b268e55384b4e5309ce1c7aa69698b1fc9fc1d3bb71bd28ff8982b93cc727cf
|
7
|
+
data.tar.gz: e7c12c6acf9a3e8ba49cb624dca77643b443ad00fe79d185da40269e09779e7c218728731faf97e32d059a62a3a42fb1059c56f5c8581b102467a2fcb593f2af
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module AppMail
|
2
|
+
module Rails
|
3
|
+
class ActionMailerDeliveryMethod
|
4
|
+
|
5
|
+
def initialize(settings)
|
6
|
+
@settings = settings
|
7
|
+
end
|
8
|
+
|
9
|
+
def settings
|
10
|
+
@settings
|
11
|
+
end
|
12
|
+
|
13
|
+
def deliver!(message)
|
14
|
+
client.send_raw_message do |m|
|
15
|
+
m.mail_from(message.from.first)
|
16
|
+
[message.to, message.cc, message.bcc].flatten.compact.uniq.each do |address|
|
17
|
+
m.rcpt_to(address)
|
18
|
+
end
|
19
|
+
m.data(message.to_s)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def client
|
26
|
+
@client ||= AppMail::Client.new(@settings[:host] || "api.appmail.io", @settings[:server_key])
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: appmail-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Adam Cooke
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-10-30 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: appmail
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.0.2
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2.0'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.0.2
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.0'
|
33
|
+
description: Rails/ActionMailer library for the AppMail E-Mail Platform
|
34
|
+
email:
|
35
|
+
- me@adamcooke.io
|
36
|
+
executables: []
|
37
|
+
extensions: []
|
38
|
+
extra_rdoc_files: []
|
39
|
+
files:
|
40
|
+
- lib/app_mail/rails/action_mailer_delivery_method.rb
|
41
|
+
- lib/app_mail/rails/version.rb
|
42
|
+
- lib/appmail-rails.rb
|
43
|
+
homepage: https://appmail.io
|
44
|
+
licenses:
|
45
|
+
- MIT
|
46
|
+
metadata: {}
|
47
|
+
post_install_message:
|
48
|
+
rdoc_options: []
|
49
|
+
require_paths:
|
50
|
+
- lib
|
51
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
requirements: []
|
62
|
+
rubyforge_project:
|
63
|
+
rubygems_version: 2.5.1
|
64
|
+
signing_key:
|
65
|
+
specification_version: 4
|
66
|
+
summary: Rails/ActionMailer library for the AppMail E-Mail Platform
|
67
|
+
test_files: []
|