Skip to content

Conversation

@psyonara
Copy link

When accidentally sending blank addresses in the lists for CC or BCC, Sendgrid's API will raise an exception. Therefore, we can ignore them when constructing the email object.

I've omitted the same check from the TO list, as we probably want an exception raised here since something more serious is wrong.

if not personalization.ccs:
for addr in msg.cc:
personalization.add_cc(Email(*self._parse_email_address(addr)))
if addr:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a warning log if addr == ""?

if not personalization.bccs:
for addr in msg.bcc:
personalization.add_bcc(Email(*self._parse_email_address(addr)))
if addr:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

@stale
Copy link

stale bot commented Jun 26, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants