sendgrid-ruby: cc and bcc is not working
I am trying to send emails using template api
client = SendGrid::Client.new(api_user: ENV['SENDGRID_USERNAME'], api_key: ENV['SENDGRID_PASSWORD'])
@user_emails = ['abc@abc.com', 'abc2@abc.com']
@header = Smtpapi::Header.new
@header.add_to(@user_emails)
@header.add_filter('templates', 'enable', 1) # necessary for each time the template engine is used
@header.add_filter('templates', 'template_id', template_id)
mail = SendGrid::Mail.new do |m|
m.to = @user_emails
m.from = from
m.from_name = fromname
m.bcc = bcc
m.subject = ' '
m.smtpapi = @header
m.html = '<img alt="" height="1" src="" style="display:none;" width="1" />'
end
client.send(mail)
The to is working fine , but bcc is not working . Is it some kind of bug
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 17 (3 by maintainers)
Commits related to this issue
- Merge pull request #38 from thepriefy/patch-1 Add Gem badge to the README file — committed to jamietanna/sendgrid-ruby by deleted user 9 years ago
It is just adding our replacements in our email templates. Where we are doing add_substitution calls there and such. Not sure if this helps but here is a stripped down version.
I’m pretty sure it works now, I think it’s not an issue anymore.