Hi Team !
I have a project in Kirby version 4.3. It is hosted on a shared server at GoDaddy. The project contains a basic contact form that I have used in other projects and it works correctly, but in this project it is causing me the following error:
SMTP Error: Could not connect to SMTP host. Failed to connect to server
I have been researching this and they say that it requires another type of configuration.
Which is why I made the change:
Path: site/config/config.php
//= π© GoDaddy
'email' => [
'transport' => [
'host' => 'localhost',
'auth' => false,
'port' => 25,
]
],
Initially I had the following:
Path: site/config/config.php
//= π© Configure Email
'email' => [
'transport' => [
'type' => 'smtp',
'host' => 'server.mx',
'port' => 465,
'security' => true,
'auth' => true,
'username' => 'mailer@server.mx',
'password' => 'passwordsecret',
]
],
None of the settings make the emails reach my Gmail accounts, nor do they reach the serverβs email accounts. So I continued investigating and saw the following configuration:
Path: site/config/config.php
'email' => [
'transport' => [
//= GMAIL
'type' => 'smtp',
'host' => 'smtp.gmail.com',
'auth' => true,
'username' => 'mailer@server.mx',
'password' => 'passwordsecret',
'security' => true,
'security' => 'tls',
'port' => 587,
]
],
I have also tried the following:
Path: site/controllers/contact.php
'beforeSend' => function ($mailer) {
$mailer->SMTPOptions = [
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
]
];
return $mailer;
}
I await your response and help please.
Thank you very much.
Regards!