paveltyk / sendgrid-rails

SendGrid extensions to Rails 3 ActionMailer::Base
http://paveltyk.github.com/sendgrid-rails/
73 stars 23 forks source link

Ability to turn off using to: field in x-smtp header #12

Open jcavena opened 11 years ago

jcavena commented 11 years ago

I've found that using x-smtp's to: key and moving the TO addresses to it, Sendgrid does not consider or use the CC and BCC fields in the regular mail header. It is not always desired to send an email using TO to someone you intended to CC or BCC, so perhaps making this an option in the notifier method rather than a hard setting would be beneficial. This way we can use the to: key in the x-smtp header when desired, and use regular TO in mail header when it's not.

DouweM commented 10 years ago

We just ran into this problem as well. I might have time to add this feature early next week.

paveltyk commented 10 years ago

@jcavena do you think that switch should be at the Application config level, or per method switch?

@DouweM any chance you will be able to address that issue?

Thanks.

DouweM commented 10 years ago

@PavelTyk I solved this with commit https://github.com/DouweM/sendgrid-rails/commit/69a311583ea094f89805d7c5408b44f9e0489734 in the branch for my PR #10, which I'm on rather than master.