# Problem sending emails with the same :from and :to domain

**URL:** <https://forum.getkirby.com/t/problem-sending-emails-with-the-same-from-and-to-domain/32602>\
**Category:** Questions\
**Tags:** v3\
**Created:** [October 3, 2024, 9:14am UTC](https://forum.getkirby.com/t/problem-sending-emails-with-the-same-from-and-to-domain/32602 "2024-10-03T09:14:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonasfeige](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jonasfeige/32/4550_2.png) [@jonasfeige](https://forum.getkirby.com/u/jonasfeige)\
**Post date:** [October 3, 2024, 9:14am UTC](https://forum.getkirby.com/t/problem-sending-emails-with-the-same-from-and-to-domain/32602/1 "2024-10-03T09:14:32Z")

</div>

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](https://github.com/beebmx/kirby-courier?tab=readme-ov-file#license), 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:

```auto
$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:

```auto
'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?

---

<div class="post-metadata">

**Author:** ![bastianallgeier](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/bastianallgeier/32/7569_2.png) [@bastianallgeier](https://forum.getkirby.com/u/bastianallgeier)\
**Post date:** [October 3, 2024, 10:04am UTC](https://forum.getkirby.com/t/problem-sending-emails-with-the-same-from-and-to-domain/32602/2 "2024-10-03T10:04:13Z")

</div>

I’m putting @beebmx in CC here 🙂

---

<div class="post-metadata">

**Author:** ![beebmx](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/beebmx/32/3726_2.png) [@beebmx](https://forum.getkirby.com/u/beebmx)\
**Post date:** [October 4, 2024, 5:31pm UTC](https://forum.getkirby.com/t/problem-sending-emails-with-the-same-from-and-to-domain/32602/3 "2024-10-04T17:31:46Z")

</div>

Hey @jonasfeige.  
I reviewed the mail (with your settings), but I was unable to reproduce the error.  
Is there a log or something else that I can check to help you with?

And you’re right, [Kirby Courier](https://github.com/beebmx/kirby-courier) is a wrapper for the Kirby `email` functionality and should work the same.

---

<div class="post-metadata">

**Author:** ![jonasfeige](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jonasfeige/32/4550_2.png) [@jonasfeige](https://forum.getkirby.com/u/jonasfeige)\
**Post date:** [October 7, 2024, 7:50am UTC](https://forum.getkirby.com/t/problem-sending-emails-with-the-same-from-and-to-domain/32602/4 "2024-10-07T07:50:28Z")

</div>

Thanks for looking into this @beebmx ! I love the plugin by the way. It seems incredibly well crafted and saves me a lot of time.

I did some further digging and think the problem is related to the domain and hosting provider (shared hosting on IONOS). Not sure where to go from here, but as expected Kirby and Courier are off the hook. 😉

 ![CleanShot 2024-10-05 at 09.02.23@2x](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/f/ff800e8ecfd7d187609f77d2632ae2b48ac3bba2.jpeg)

> **[Blacklisting bei GMX, Web.de, 1&1 Ionos (United Internet)](https://hilfe.udmedia.de/e-mail/fehlercodes-fehlermeldungen/blacklisting-bei-gmx-webde-11-ionos-united-internet/)**

---

<div class="post-metadata">

**Author:** ![beebmx](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/beebmx/32/3726_2.png) [@beebmx](https://forum.getkirby.com/u/beebmx)\
**Post date:** [October 7, 2024, 5:32pm UTC](https://forum.getkirby.com/t/problem-sending-emails-with-the-same-from-and-to-domain/32602/5 "2024-10-07T17:32:44Z")

</div>

> [@jonasfeige](#):
>
> I love the plugin by the way. It seems incredibly well crafted and saves me a lot of time.

Thank you @jonasfeige
