Skip to content
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 and CC Check before sending #480

Closed
LorenDorez opened this issue Jun 21, 2017 · 4 comments
Closed

BCC and CC Check before sending #480

LorenDorez opened this issue Jun 21, 2017 · 4 comments
Labels
difficulty: medium fix is medium in difficulty status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap

Comments

@LorenDorez
Copy link

I posted this issue a while back here
#297

It appears you only added the appropriate fix to the .clear() method. However i ran into an instance where a developer set the BCC and CC fields on a personaliztion object to
new List<EmailAddress>();

this caused there to be essentially a blank list. It would be better error handling to add a check on the process that builds the email request to check if there are BCC and if so add them to the JSON output as such

if (bccAddresses != null && bccAddresses.Count() > 0)
{
   // ADD TO JSON OUTPUT
}
@thinkingserious thinkingserious added status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap labels Jun 21, 2017
@thinkingserious
Copy link
Contributor

Hi @LorenDorez,

Thanks for submitting this request! I have added it to our backlog. It can gain priority via additional votes and/or a PR.

With Best Regards,

Elmer

@daerogami
Copy link

I had a similar issue. We have a segment of code that overrides all the outgoing emails for testing.

The following works:

foreach (var personalization in message.Personalizations)
{
    personalization.Tos =
        new List<EmailAddress>(overrideEmailRecipient.Split(';').Select(s => new EmailAddress(s)));
    personalization.Ccs = null;
    personalization.Bccs = null;
}

If those nulls are new List<EmailAddress>() instead, the email does not send.

@thinkingserious
Copy link
Contributor

Hello @daerogami,

Thanks for taking the time to offer your solution, we really appreciate it! Could you please take a moment to fill out this form so we can send you some swag?

Also, PRs are greatly appreciated if you are up to it :)

With Best Regards,

Elmer

@thinkingserious
Copy link
Contributor

Since there has been no activity on this issue since March 1, 2020, we are closing this issue. Please feel free to reopen or create a new issue if you still require assistance. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: medium fix is medium in difficulty status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

No branches or pull requests

4 participants