Troubleshooting Contact Form | Email delivery fails to strict servers

Hello Community!

I’ve tried solving this for the past 12 hours, and I’ve decided to ask for help.

I’ve set up an SMTP connection in my config/config.php for Mailjet. I’ve tested it with telnet in my terminal, and my credentials are correct. When sending to a less strict domain like Tutanota, it works fine. However when sending to Gmail or Ionos servers, the message never arrives. I’ve tried adding a SENDER header, I’ve tried using the same FROM and REPLY TO headers. It does not seem to fix the issue.

What would be the best way to troubleshoot this? I don’t think it’s related to SPIF/DKIM/DMARC/MX, because the same SMTP commands worked when used in telnet.

Liebe Grüße aus Wien

Update:

I checked again in Tutanota, where the mail got delivered. The email seems to be sent with Postfix from my server instead of Mailjet SMTP. Have I overlooked something in my config/config.php?

<?php

return [
    'debug' => true,
    'languages' => true,
    'languages.detect' => true,
    'email' => [
        'transport' => [
            'type' => 'stmp',
            'host' => 'in-v3.mailjet.com',
            'port' => '587',
            'security' => 'true',
            'auth' => 'true',
            'username' => 'APIKEY',
            'password' => 'SECRETKEY',
        ]
    ]
];

Bzw. do I need to add something to the controller?

$success = $kirby->email([
                        'template' => 'contact',
                        'from'     => 'me@mydomain.eu',
                        'replyTo'  => $data['email'],
                        'to'       => 'me@mydomain.eu',
                        'subject'  => '[CONTACT FORM] ' . esc($data['name']) . ' sent you a message',
                        'data'     => [
                            'text'   => esc($data['text']),
                            'sender' => esc($data['name']),
                            'email'  => esc($data['email'])
                        ]
                    ])->isSent();

First thing that meets the eye: This must be a boolean not a string.

Hey Sonja,
thank you for your quick reply! Apart from the booleans, I also misspelled SMTP in the config file. What a stupid mistake, seems like I was overthinking the issue haha

Now everything works as intended! Thanks for the help!