-
Notifications
You must be signed in to change notification settings - Fork 703
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
bcc does not work in latest versions #83
Comments
Are you doing something that is triggering usage of the X-SMTP API? I just ran across this and found sendgrid/sendgrid-php#23 X-SMTP doesn't support BCC it seems, since each Still trying to find a workaround! |
Same problem. Would be nice if this were at least documented, because it's caused us some trouble. |
Likewise, haven't found a solution for this |
For a workaround, use mail.to = ['email1', 'email2']
mail.bcc = ['email1', 'email2'] I will update the add_to method in the library to default to regular 'To' parameter instead of the SMTPAPI (which can't use BCC unless its the BCC filter). |
Hey, I have pushed a new release which is very specific. In order to use the SMTPAPI header, you need to explicitly say so instead of the add_to method defaulting to it. Wrapper methods were created in order to be backwards compatible with the other SMTPAPI methods (subs, filters etc). Let me know if this works for all of you :) |
@elbuo8 Thanks for the workaround. I tried out the first approach, but it's not great because the address that I'm trying to bcc is unable to see who the original email was intended for if it just gets sent via the "to" field. I haven't tried using your new commit, but I'm guessing it would work similarly given the add_to method. Should I assume that the smtpapi bcc filter is the only way to do this then? |
@suhaasprasad the new version add_to method will behave the way you are expecting it to behave :) If you use the bcc filter, the BCC recipient will not be able to see the To recipients. |
@suhaasprasad did you figure this out finally? I am meeting the exactly same problem now. |
import sendgrid class SendMail(): if name == 'main': and my mail.get() is: {'subject': 'Testing_Sendgrid', 'from': {'email': ''xyz@gmail.com'', 'name': 'qwerty'}, 'personalizations': [{'to': [{'email': ''xyz@gmail.com''}]}, {'bcc': [{'email': ''xyz@gmail.com''}], 'cc': [{'email': 'xyz@gmail.com'}]}], 'content': [{'value': 'Hey this is sagar from digicollect', 'type': 'text/html'}]} and i get this error HTTP Error 400: Bad Request can someone guide me through this |
Hello @sachin2811, Can you please extract the error message like so? Thanks! With Best Regards, Elmer |
Hey @thinkingserious thanks for your reply, I get this |
Hello @sachin2811, What is the value of |
It doesn't happen that way since it does not return anything. It says bad request 400 |
Hello @sachin2811, I think I've discovered what happened. When you call the I hope that helps! With Best Regards, Elmer |
Hi @thinkingserious .Figured it, did whatever your mentioned and its fine now.Thanks |
I'm using the add_bcc method to specify a bcc list.
When I first installed it the version was 0.5.4
Everything was working fine till I updated to the latest version 1.1.0. After updating the bcc functionality stopped working. The emails were still being delivered to the addresses specified in the "to" field but nothing is delivered to the "bcc" addresses.
I checked and can reproduce this problem in 1.0.1 too.
(I've fixed the issue temporarily by rolling back to 0.5.4)
Thanks
The text was updated successfully, but these errors were encountered: