smitty 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MzAwMTFmM2Y2NDhjZmU1M2FlMGFkMWI5Y2E0MmZhMjZlZTc1MDAzMQ==
5
- data.tar.gz: !binary |-
6
- M2IxMzczYTZhM2Q2YTk4MDM0YzFkM2VkZGU5Yjc5MGU5YjI4M2M1OQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MTg2ZDY0NjE4OWMzM2JmMWY0N2RkZGQwZGJkN2FiOGJiZDdiMjAwY2YzYWM5
10
- YjUyM2M0MTAyZGU3MWM4NGIxYTY2ZWRmY2U3ZWMyYmM4YjM3NTE2ZGQ1Yzc3
11
- MDZmZGQ2NTlkZmJlNTgzMDZkYzgyYjRjMWM1MDIzYjEwMjY4ZGU=
12
- data.tar.gz: !binary |-
13
- ZTFjYjFlM2YwYmVjZTU5ZjY5MDcwNjQ0YWQ3NGExZGI0YWExNzY4MzkzMTVl
14
- NmZlM2ZhYzgxNGM1NTM5Yzc2MGUzMjg0ZTczMjFmNmUxMTg4NDFkYzM1NmRl
15
- NTZjNTU0ZjMxYTBkOWQzOTYwYTE4MjhlZDJjNzZhZWM1YjE4MjY=
2
+ SHA1:
3
+ metadata.gz: 99f18cd4b2ab78702b742489c513630ef14a0172
4
+ data.tar.gz: ea44ee3424c3aa68e55097d98923ed9d5959f3a7
5
+ SHA512:
6
+ metadata.gz: 8ed00c0ea27426851eb924c951e1fb96f67a7edae3b3458204e9dfe238b4e326ec1cf000dd2b5e477291f5eecee0745276bf0a15265c02c186631cc37f087326
7
+ data.tar.gz: e83f1e5afb6b194f85aa526eaa8b0c87bd82d3f5436d5e22ea6702e3bdb9135c9bde4a46e0e349d4e79ea5dd8e2f8b515a8650cccf2d37d1d384b5a95fb1db56
data/README.md CHANGED
@@ -21,7 +21,7 @@ Or build and install it yourself as:
21
21
 
22
22
  ## Usage
23
23
 
24
- Smitty 0.0.2
24
+ Smitty 0.0.4
25
25
 
26
26
  Usage:
27
27
  ./smitty [options] <from_address> <to_file> <subject> <template>
@@ -49,6 +49,7 @@ Or build and install it yourself as:
49
49
  --password PASSWORD SMTP password.
50
50
  --cc address Add a cc address.
51
51
  --bcc address Add a bcc address.
52
+ --messageid FQDN Set a FQDN to use when generating the message-id for each message.
52
53
  --dry-run Output messages and don't send.
53
54
 
54
55
  ## Contributing
data/bin/smitty CHANGED
@@ -5,6 +5,7 @@ require 'docopt'
5
5
  require 'nokogiri'
6
6
  require 'premailer'
7
7
  require 'smitty'
8
+ require 'securerandom'
8
9
 
9
10
  # Parse arguments
10
11
  begin
@@ -23,6 +24,8 @@ end
23
24
  attachments = args['-a'].split(',') if args['-a']
24
25
  from_address = args['<from_address>']
25
26
  subject = args['<subject>']
27
+ message_id_fqdn = from_address.split('@')[1]
28
+ message_id_fqdn = args['-messageid'] if args['-messageid']
26
29
 
27
30
  # Read to_file into list of addresses
28
31
  begin
@@ -66,6 +69,7 @@ to_addresses.each do |to_address|
66
69
  mail.bcc = args['--bcc'] unless args['--bcc'].nil?
67
70
  mail.cc = args['--cc'] unless args['--cc'].nil?
68
71
  mail.subject = subject_copy
72
+ mail.message_id = "<#{SecureRandom.hex(8)}.#{SecureRandom.hex(8)}@#{message_id_fqdn}>"
69
73
  mail.text_part do
70
74
  body Nokogiri::HTML(template_copy).text
71
75
  end
@@ -28,6 +28,7 @@ Options:
28
28
  --password PASSWORD SMTP password.
29
29
  --cc address Add a cc address.
30
30
  --bcc address Add a bcc address.
31
+ --messageid FQDN Set a FQDN to use when generating the message-id for each message.
31
32
  --dry-run Output messages and don't send.
32
33
 
33
34
  DOC
@@ -1,3 +1,3 @@
1
1
  module Smitty
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smitty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Steele
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-01 00:00:00.000000000 Z
11
+ date: 2014-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.5.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.5.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.6.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.6.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: mail
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: 2.5.4
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: 2.5.4
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: premailer
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ! '>='
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.7.3
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.7.3
69
69
  - !ruby/object:Gem::Dependency
@@ -84,14 +84,14 @@ dependencies:
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ! '>='
87
+ - - '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ! '>='
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  description: Send mail with handlebars like templates
@@ -125,17 +125,17 @@ require_paths:
125
125
  - lib
126
126
  required_ruby_version: !ruby/object:Gem::Requirement
127
127
  requirements:
128
- - - ! '>='
128
+ - - '>='
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  requirements:
133
- - - ! '>='
133
+ - - '>='
134
134
  - !ruby/object:Gem::Version
135
135
  version: '0'
136
136
  requirements: []
137
137
  rubyforge_project:
138
- rubygems_version: 2.0.7
138
+ rubygems_version: 2.0.3
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  summary: Send mail with handlebars like templates