From 6ca4cc4a818114d39833e02ae3215c464b9bc543 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 3 Nov 2015 12:56:01 +1100 Subject: [PATCH 1/3] Add attr_accessor for cc_name and bcc_name --- lib/sendgrid/mail.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sendgrid/mail.rb b/lib/sendgrid/mail.rb index 58a5393a..05fd45bf 100644 --- a/lib/sendgrid/mail.rb +++ b/lib/sendgrid/mail.rb @@ -4,8 +4,8 @@ module SendGrid class Mail - attr_accessor :to, :to_name, :from, :from_name, :subject, :text, :html, :cc, - :bcc, :reply_to, :date, :smtpapi, :attachments, :content, :template + attr_accessor :to, :to_name, :from, :from_name, :subject, :text, :html, :cc, :cc_name, + :bcc, :bcc_name, :reply_to, :date, :smtpapi, :attachments, :content, :template def initialize(params = {}) params.each do |k, v| From 8a4653762f08ce5e9c3db6199d8c4d9c16e6d6c0 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 3 Nov 2015 12:57:55 +1100 Subject: [PATCH 2/3] Add cc_name and bcc_name to readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index cf2cfdbc..e4d91b91 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,9 @@ params = { :text, :html, :cc, + :cc_name, :bcc, + :bcc_name, :reply_to, :date, :smtpapi, From 781e2e8f79e764e5db0884d4b6cc8ee0766288eb Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 3 Nov 2015 13:10:44 +1100 Subject: [PATCH 3/3] Actually add the cc_name and bcc_name to payload --- lib/sendgrid/mail.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/sendgrid/mail.rb b/lib/sendgrid/mail.rb index 05fd45bf..8e777d0f 100644 --- a/lib/sendgrid/mail.rb +++ b/lib/sendgrid/mail.rb @@ -139,7 +139,9 @@ def to_h :date => date, :replyto => reply_to, :cc => cc, + :ccname => cc_name, :bcc => bcc, + :bccname => bcc_name, :text => text, :html => html, :'x-smtpapi' => smtpapi_json,