I am not getting any emails from Kanboard, even though if I send a comment or a card by email, Kanboard gives a message saying it was successfully sent.
I have tested that my server will successfully send an email via PHP mail() with a test php script.
So after a lot of testing, I discovered that PHP mail fails when there is an invalid email address in the headers. Since I am using PHP 8, and the PHP constant PHP_EOL has changed between php 7.4. and php 8.x., I followed the advice here and it worked!
May I ask what version of Kanboard you have installed, Miss Lara? Because the version of Kanboard I have installed is 1.2.41, and I encountered the same issue as you when using SMTP to send emails.
Hi, Lara. I receive the similar problem like you. But I’m using smtp to send email. And I’m using kanboard-1.2.43 and php 8.x. Here is my mail configuration.
define('MAIL_FROM', 'ANY_EMAIL@163.com');
// E-mail address used for the "Bcc" header to send a copy of all notifications
define('MAIL_BCC', '');
// Mail transport available: "smtp", "sendmail", "mail" (PHP mail function)
define('MAIL_TRANSPORT', 'smtp');
// SMTP configuration to use when the "smtp" transport is chosen
define('MAIL_SMTP_HOSTNAME', 'smtp.163.com');
define('MAIL_SMTP_PORT', 587);
define('MAIL_SMTP_USERNAME', 'ANY_EMAIL@163.com');
define('MAIL_SMTP_PASSWORD', 'ANY_PASSWORD');
define('MAIL_SMTP_HELO_NAME', null);
define('MAIL_SMTP_ENCRYPTION','tls');
// Sendmail command to use when the transport is "sendmail"
define('MAIL_SENDMAIL_COMMAND', '/usr/sbin/sendmail -bs');
Do you know how should I change to successfully receive the email sended? I sincerely hope you can give me some advice. TKS.
Yeah, I have read the post about this fix but I am using SMTP. It seems that the fix in line 162~168 is for not using SMTP( also comment in line 163).
163 // Non-windows (not using SMTP)
I’m not sure if this fix works for me. But I will try this after this reply.
…
Hi, now I have tried this fix but it still does not work. I tried to send a invitation for a new user by a valid email and Kanboard have messaged that it has been successfully sent. However, there’s no response.
Hi, @Lora. I just changed the port from 587 to 465 and the MAIL_SMTP_ENCRYPTION from tls to ssl. Then it works unexpectedly. I never think about its solution could be so simple.
Thank you all for your kind reply.