sendgrid-ruby 1.1.5 → 1.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/FETCH_HEAD +0 -0
- data/README.md +2 -0
- data/example.rb +9 -2
- data/lib/sendgrid/mail.rb +5 -3
- data/lib/sendgrid/version.rb +1 -1
- data/spec/lib/sendgrid_spec.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0997af40965b55afccbb2fd70def32ed7c8213a
|
4
|
+
data.tar.gz: 2453f6b8577c67c463a30260b5e33e05e5d4d4a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 645b595f82306ba093af8d4b6e8465d2e243ca149070a411d5d90295845b8eda5433b6b89c8ffb62db520b949df26a7011d357b978ffa8bce7e1b038b2f0b337
|
7
|
+
data.tar.gz: 6c982e7e5c6c6c5366cc5332019383114d189b6b4d39092b3c33139e56bed3d85da1596a6a4a9b1fcf3818c7d7f774ea43d7412c0b0cf10f3311d7056b26b652
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# Change Log
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## [1.1.6] - 2015-11-26 ##
|
5
|
+
## Added
|
6
|
+
Support for cc_name and bcc_name via [#31](https://github.com/sendgrid/sendgrid-ruby/pull/31)
|
7
|
+
|
8
|
+
Thanks [Dylan](https://github.com/DylanGriffith)!
|
9
|
+
|
4
10
|
## [1.1.5] - 2015-10-28 ##
|
5
11
|
## Added
|
6
12
|
Support for [Templates](https://github.com/sendgrid/sendgrid-ruby#working-with-templates) via [#28](https://github.com/sendgrid/sendgrid-ruby/pull/28)
|
data/FETCH_HEAD
ADDED
File without changes
|
data/README.md
CHANGED
data/example.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
# using ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
|
3
3
|
# attachment is sent but only a corrupted 1k file
|
4
4
|
|
5
|
+
|
5
6
|
require_relative "lib/sendgrid-ruby.rb"
|
6
7
|
|
7
8
|
require 'dotenv'
|
@@ -19,8 +20,14 @@ client = SendGrid::Client.new do |c|
|
|
19
20
|
end
|
20
21
|
|
21
22
|
mail = SendGrid::Mail.new do |m|
|
22
|
-
m.to = '
|
23
|
-
m.
|
23
|
+
m.to = 'to@example.com'
|
24
|
+
m.to_name = 'John Doe'
|
25
|
+
m.from = 'from@example.com'
|
26
|
+
m.from_name = 'Jane Doe'
|
27
|
+
m.cc = 'cc@example.com'
|
28
|
+
m.cc_name = 'John Doe CC'
|
29
|
+
m.bcc = 'bcc@examlpe.com'
|
30
|
+
m.bcc_name = 'Jane Doe BCC'
|
24
31
|
m.subject = 'Hello world!'
|
25
32
|
m.text = 'I heard you like the beach.'
|
26
33
|
m.html = 'I heard you like the beach <div><img src="cid:beach"></div>'
|
data/lib/sendgrid/mail.rb
CHANGED
@@ -4,8 +4,8 @@ require 'mimemagic'
|
|
4
4
|
|
5
5
|
module SendGrid
|
6
6
|
class Mail
|
7
|
-
attr_accessor :to, :to_name, :from, :from_name, :subject, :text, :html, :cc,
|
8
|
-
:bcc, :reply_to, :date, :smtpapi, :attachments, :content, :template
|
7
|
+
attr_accessor :to, :to_name, :from, :from_name, :subject, :text, :html, :cc, :cc_name,
|
8
|
+
:bcc, :bcc_name, :reply_to, :date, :smtpapi, :attachments, :content, :template
|
9
9
|
|
10
10
|
def initialize(params = {})
|
11
11
|
params.each do |k, v|
|
@@ -79,7 +79,7 @@ module SendGrid
|
|
79
79
|
else
|
80
80
|
bcc << email
|
81
81
|
end
|
82
|
-
add_bcc_name(name)
|
82
|
+
add_bcc_name(name) if name
|
83
83
|
end
|
84
84
|
|
85
85
|
def add_bcc_name(name)
|
@@ -139,7 +139,9 @@ module SendGrid
|
|
139
139
|
:date => date,
|
140
140
|
:replyto => reply_to,
|
141
141
|
:cc => cc,
|
142
|
+
:ccname => cc_name,
|
142
143
|
:bcc => bcc,
|
144
|
+
:bccname => bcc_name,
|
143
145
|
:text => text,
|
144
146
|
:html => html,
|
145
147
|
:'x-smtpapi' => smtpapi_json,
|
data/lib/sendgrid/version.rb
CHANGED
data/spec/lib/sendgrid_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sendgrid-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robin Johnson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-11-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: smtpapi
|
@@ -205,6 +205,7 @@ files:
|
|
205
205
|
- ".rubocop.yml"
|
206
206
|
- ".travis.yml"
|
207
207
|
- CHANGELOG.md
|
208
|
+
- FETCH_HEAD
|
208
209
|
- Gemfile
|
209
210
|
- Guardfile
|
210
211
|
- LICENSE.txt
|