Hello.
I am pretty sure this isn’t actually a Kirby related problem, but maybe someone can help me out anyway:
On a client’s site, I want to send signup emails to the client’s clients, as well as to the client themselves in BCC. I am using the Kirby Courier plugin, which under the hood seems to simply employ Kirby’s built-in email()
functionality. I am also using SMTP - Mailhog locally and MailerSend in production.
This is an abbreviated version of my code for sending the email:
$email = new Message();
$email
->from('client@client.de', 'Client')
->to('max@mustermann.de')
->replyTo('client@client.de')
->bcc('signups@client.de')
->send();
And my config:
'email' => [
'transport' => [
'type' => 'smtp',
'host' => 'smtp.mailersend.net',
'port' => 587,
'security' => auto,
'auth' => true,
'username' => username,
'password' => password
],
]
The email is successfully delivered to max@mustermann.de
, but the BCC to signups@client.de
isn’t going through. If I change the BCC to another email address with another domain, it works as expected.
This is happening both with Mailhog, MailerSend and even using the built-in PHP mail. I was previously using the MailerSend API, which had no problem with delivering to and from the same domain.
Does anyone have any idea what might be causing this?