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

Send mail to CC with 5.x version

Open thomas-serverhouse opened this issue 2 years ago • 2 comments

Laravel version: 9.17.0 Package version: 5.0.3

Hi, I'm trying to send an email with one main recipient and one copy. However both receive the email as "to" and the other recipient doesn't appear in the email body.

I tried the same thing on Laravel 8 (8.83.16) and the 4.0.4 version and everything works fine.

For now i can just use SMTP authentication but can you guys take a look?

Thanks

thomas-serverhouse avatar Jun 20 '22 14:06 thomas-serverhouse

Hi @thomas-serverhouse Could you sent us an example on how you sent the mail with both 5.0.3 and 4.0.4 then we can replicate it and see if its an easy change.

eldor avatar Jun 22 '22 07:06 eldor

Hi,

Sorry for the late response, i didn't get any notifications when you replied.

I just tried again with a fresh install of L8 and L9.

Here's how i send the email (same problem if i use a mail class)


use Illuminate\Mail\Message;
use Illuminate\Support\Facades\Mail;

// .....

Mail::send('mail', [], function (Message $message) {
    $message->to('[email protected]');
    $message->cc('[email protected]');
    $message->bcc('[email protected]');
    $message->subject('Test Message');
});

With Laravel 9 everyone receive the email as "to". The header shows for the three of them To: <[email protected]> (with xxx being their own address).

With Laravel 8 everything works as intended. The header is the same for everyone : To: [email protected] Cc: [email protected]

thomas-serverhouse avatar Jun 28 '22 07:06 thomas-serverhouse

@thomas-serverhouse could you test PR #28

makije avatar Dec 06 '22 07:12 makije

@thomas-serverhouse closing this issue, there has been a PR #28 to test since 6 dec 22. You are welcome to create a new issue if its still a problem

eldor avatar Feb 21 '23 09:02 eldor