laravel-sendgrid-driver icon indicating copy to clipboard operation
laravel-sendgrid-driver copied to clipboard

Multiple e-mails in `to` field

Open ajanini opened this issue 5 years ago • 3 comments

Hello,

How can I set multiple addresses in the to field?

I've tried:

$config = [
    'personalizations' => [
        [
            'to' => [
                [
                    'email' => '[email protected]',
                    'name'  => 'user1',
                ],
                [
                    'email' => '[email protected]',
                    'name'  => 'user2',
                ],
            ],
            'substitutions' => [
                '%company%' => 'Acme',
            ],
        ],
    ],
];

and

$config = [
    'personalizations' => [
        [
            'to' => [
                '[email protected]',
                '[email protected]',
            ],
            'substitutions' => [
                '%company%' => 'Acme',
            ],
        ],
    ],
];

Is this not possible?

ajanini avatar Oct 18 '19 16:10 ajanini

I think the same goes for cc and bcc fields.

ajanini avatar Oct 18 '19 17:10 ajanini

Thanks, this is good issue. Now, it seems impossible to send in this way. I want to fix it but I'm on a vacation now. If you are harried, Please create the PR.

s-ichikawa avatar Oct 22 '19 14:10 s-ichikawa

Thanks @s-ichikawa. I have no experience creating a PR. I'm gonna study it, but hope you can fix it sooner than I can.

ajanini avatar Oct 22 '19 14:10 ajanini