beam-community / bamboo

Testable, composable, and adapter based Elixir email library for devs that love piping.
https://hex.pm/packages/bamboo
MIT License
1.91k stars 341 forks source link

NilRecipientsError thrown incorrectly for SendGrid emails #643

Open emadalam opened 2 years ago

emadalam commented 2 years ago

As per the SendGrid usage, the send api allows us to skip the to, cc, bcc at the root level as long as the personalizations key with valid fields are provided. However the Mailer seem to be validating this at root level regardless of the adapter in use, and throws a NilRecipientsError.

Is there any workaround or quick fix for this? How can we send an email (common from, template_id etc) to multiple recipients via personalizations key, without setting the root level to, cc or bcc? The current personalizations implementation doesn't seem to fulfil the use case. Am I missing something?

github-actions[bot] commented 1 week ago

This issue has been automatically marked as "stale:discard". We are sorry that we haven't been able to prioritize it yet. If this issue still relevant, please leave any comment if you have any new additional information that helps to solve this issue. We encourage you to create a pull request, if you can. We are happy to help you with that.