- Issue created by @jfurnas
- πΊπΈUnited States ja09
Same issue here ever since upgrading from d9 to d10. I've tried many versions of this module and the patch from the parent issue with no luck.
- πΊπΈUnited States jfurnas
@ja09 That's correct. I can send the sendgrid test email, and all of the default system emails (password resets, etc) all go through, but any other emails not generated by Drupal core (like from other modules, or from custom modules), all throw the same error.
I did some debugging, and I temporarily added a print statement where the Assertion happens at (in vendor/fastglass/sendgrid/src/Mail/emailAddress.php), and it's printing the email address field twice, with no space and no commas between them. (e.g. test@example.comtest@example.com) on the PHP error page.
- πΊπΈUnited States eahonet
Possibly unrelated. But your debugging info helped me solve my problem on a Drupal10 site.
I ran into a similar issue that I was getting this error when my custom module sent an email, but the test and system emails were fine. Turns out my custom code was sending "email1@domain.com,email2@domain.com,". The ending comma was the issue that needed resolving for the error to stop. The third "blank" email was throwing the error.