vf-email-handler 0.0.1 → 0.1.0
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 +4 -4
- data/README.md +33 -9
- data/lib/logger/logger.rb +1 -1
- data/lib/meta/version.rb +1 -1
- data/vf-email-handler.gemspec +1 -1
- metadata +3 -5
- data/spec/integration_spec.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c1778f9431c9ade3da0ea1dfd1b8f959c8985e6
|
4
|
+
data.tar.gz: ab78ce69d2f189ca009a17defbeedc1aa1dc966c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0e8e25829b0acbaf7cdc3311f531890c58db300a6154850e2f66f574425daea629cbe14e8cc51a101672a1af915507e380d68c28306804bff4df28616e68660
|
7
|
+
data.tar.gz: 73e59bf4f5166e888499ebea3ec5730de0fe42116e9dddb411152e5749f282f5ba17ba80b5a4e144c75e0495668c0c82f37af1517a44f668be2b74e34f51aec3
|
data/README.md
CHANGED
@@ -5,6 +5,18 @@ Logic that binds the Amazon SQS (Simple Queue Service) to the Amazon SES (Simple
|
|
5
5
|
|
6
6
|
The handler will poll a specified SQS Queue and translate the messages to somethign that SES can understand and then push them to SES; effectively sending the emails.
|
7
7
|
|
8
|
+
The SQS message should look something like this:
|
9
|
+
|
10
|
+
```javascript
|
11
|
+
{
|
12
|
+
"from": "SES verified email <noreply@videofy.me>",
|
13
|
+
"to": "Person <kalle@videofy.me>",
|
14
|
+
"subject": "Subject of the email",
|
15
|
+
"html": "<p> A little email </p>"
|
16
|
+
}
|
17
|
+
```
|
18
|
+
There are ofcourse a bunch of other fields that can be used, check the code for more info.
|
19
|
+
|
8
20
|
####Get up and running with the mail handler
|
9
21
|
To start with there are some dependencies that must be satisfied.
|
10
22
|
* Ruby ( >= 2.1.2) must be installed on the host computer
|
@@ -12,26 +24,38 @@ To start with there are some dependencies that must be satisfied.
|
|
12
24
|
|
13
25
|
To install just type `gem install vf-email-handler` and you're set to go.
|
14
26
|
|
27
|
+
To build the gem from source hit `rake gem:build` and that will build the gem and install it.
|
28
|
+
|
15
29
|
Then there is just the matter of writing the config, which of course the handler can do for you; at least get you started.
|
16
30
|
Type the following:
|
17
31
|
|
18
32
|
```bash
|
19
|
-
|
33
|
+
vf-email-handler create-config
|
20
34
|
```
|
21
35
|
|
22
|
-
and it will generate a config-skeleton for you. Looking inside `
|
23
|
-
|
24
|
-
```
|
25
|
-
|
36
|
+
and it will generate a config-skeleton for you. Looking inside `mailer_config.yml` we se this:
|
37
|
+
|
38
|
+
```yaml
|
39
|
+
:aws:
|
40
|
+
:ses:
|
41
|
+
:access_key_id: <YOUR AWS ACCESS_KEY_ID>
|
42
|
+
:secret_access_key: <YOUR AWS SECRET_ACCESS_KEY>
|
43
|
+
:ses_server: email.eu-west-1.amazonaws.com
|
44
|
+
:sqs:
|
45
|
+
:access_key_id: <YOUR AWS ACCESS_KEY_ID>
|
46
|
+
:secret_access_key: <YOUR AWS SECRET_ACCESS_KEY>
|
47
|
+
:sqs_queues: [<NAMES OF YOUR AWS SQS QUEUES>]
|
48
|
+
:aws_region: eu-west-1
|
49
|
+
:batch_size: <OPTIONAL DEFAULT 1 MAX 10>
|
50
|
+
|
51
|
+
:logger:
|
52
|
+
:log_file: <PATH TO LOGFILE HERE; Null if STOUT>
|
26
53
|
```
|
27
54
|
|
28
55
|
Fill in the blanks and then start the handler by running.
|
29
56
|
|
30
57
|
```bash
|
31
|
-
|
58
|
+
vf-email-handler run mailer_config.yml
|
32
59
|
```
|
33
60
|
|
34
|
-
#####Daemonize
|
35
|
-
There is an init.d script in the opt folder of the repo.
|
36
|
-
|
37
61
|
Happy hacking!
|
data/lib/logger/logger.rb
CHANGED
data/lib/meta/version.rb
CHANGED
data/vf-email-handler.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vf-email-handler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Videofy
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-09-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-ses
|
@@ -105,7 +105,6 @@ files:
|
|
105
105
|
- lib/meta/version.rb
|
106
106
|
- lib/models/email.rb
|
107
107
|
- lib/workers/threaded_worker.rb
|
108
|
-
- spec/integration_spec.rb
|
109
108
|
- spec/interfaces/ses_spec.rb
|
110
109
|
- spec/interfaces/sqs_spec.rb
|
111
110
|
- spec/mail_handler_spec.rb
|
@@ -123,7 +122,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
123
122
|
requirements:
|
124
123
|
- - ">="
|
125
124
|
- !ruby/object:Gem::Version
|
126
|
-
version: 2.
|
125
|
+
version: 2.0.0
|
127
126
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
127
|
requirements:
|
129
128
|
- - ">="
|
@@ -136,7 +135,6 @@ signing_key:
|
|
136
135
|
specification_version: 4
|
137
136
|
summary: Integrates AWS SQS with SES letting youseemlessly queue emails for sending
|
138
137
|
test_files:
|
139
|
-
- spec/integration_spec.rb
|
140
138
|
- spec/interfaces/ses_spec.rb
|
141
139
|
- spec/interfaces/sqs_spec.rb
|
142
140
|
- spec/mail_handler_spec.rb
|
data/spec/integration_spec.rb
DELETED
File without changes
|