Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add attr_accessor for cc_name and bcc_name #31

Merged
merged 3 commits into from
Nov 26, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ params = {
:text,
:html,
:cc,
:cc_name,
:bcc,
:bcc_name,
:reply_to,
:date,
:smtpapi,
Expand Down
6 changes: 4 additions & 2 deletions lib/sendgrid/mail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down Expand Up @@ -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,
Expand Down