Closed (fixed)
Project:
SendGrid Integration
Version:
8.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
29 Oct 2022 at 00:55 UTC
Updated:
16 Mar 2023 at 02:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
sergiogsanchez commentedComment #3
sergiogsanchez commentedComment #4
sergiogsanchez commentedComment #5
gaurav-mathur commentedComment #6
gaurav-mathur commentedI reproduce this and apply patch#2 and it's working. adding screenshot for the reference.
Comment #8
perignon commentedCommitted! Thanks for the patch and the testing.
Comment #10
gregglesThanks for the work identifying and fixing this bug!
A site that I work on is affected by this and I knew we had upgraded to 8.x-2.0 recently so I was curious why we didn't have this fix. Then I realized that this fix is not in the stable release. I created #3342802: Create 8.x-2.1 release to consider when and whether it's time for an 8.x-2.1 release. If there are other issues worth fixing before making a release please add them there and I can try to help get them fixed.
We've got a workaround for now and will probably roll out the dev version soon, but hoping to use stables where possible.
Thanks!
Comment #11
jfurnas commentedI am running PHP 8.1 and using the latest version of sendgrid_integration (with the above patch included in it), and I am receiving the same error message, except it's not returning the 'to' address. I can replicate it across all emails being sent in the system (both custom emails and system emails)
Comment #12
xamountAs said in #11, I am also still experiencing this error message. I have confirmed this twice.
In my case, I am using Sendgrid to send Drupal Commerce emails for order confirmations. Apart from sending the emails to the person (1 recipient), I am using Blind Carbon Copy so now it's 2 recipients and it's breaking Sendgrid.
When I turn off the Blind Carbon Copy, it works (sending to 1 recipient).
So it seems there is something still wrong with sending to multiple email addresses.
This issue is highly critical for me as it's blocking Drupal Commerce orders from going through. I have to turn off Blind Carbon Copy in the meantime. Hence I am raising the priority to "Major" as I have a temporary workaround and hope that the maintainer will re-open this issue.
My exact error message is:
SendGrid\Exception\TypeException: "$emailAddress" must be a valid email address. Got: xxx@xxx.com in SendGrid\Helper\Assert::email() (line 68 of /code/vendor/fastglass/sendgrid/src/Helper/Assert.php).xxx@xxx.com is the 2nd recipient (the email that I have for bcc).
Drupal 9.54
PHP 8.0.27
SendGrid Integration 8.x-2.1