Send by email does not work

I have tried both ssl and tls, yet my kanboard does not send emails when i attempt to send a task via email. My config is below.

// Enable/disable email configuration from the user interface
define('MAIL_CONFIGURATION', true);

// E-mail address used for the "From" header (notifications)
define('MAIL_FROM', 'myemail@gmail.com');

// Mail transport available: "smtp", "sendmail", "mail" (PHP mail function), "p$
define('MAIL_TRANSPORT', 'smtp');

// SMTP configuration to use when the "smtp" transport is chosen
define('MAIL_SMTP_HOSTNAME', 'smtp.gmail.com');
define('MAIL_SMTP_PORT', 465);
define('MAIL_SMTP_USERNAME', 'myemail@gmail.com');
define('MAIL_SMTP_PASSWORD', 'my-pw');
define('MAIL_SMTP_ENCRYPTION', 'ssl'); // Valid values are null (not a string "$

// Sendmail command to use when the transport is "sendmail"
define('MAIL_SENDMAIL_COMMAND', '/usr/sbin/sendmail -bs');

There is no debug log in the data subdirectory either.

Have to use tls for gmail, port 587.

It also has to authorized in gmail.

I have already tried TLS to no avail.

Can you expand on your second point please?

https://support.google.com/accounts/answer/6010255?hl=en

https://support.google.com/cloudidentity/answer/6260879?hl=en

You have to enable less secure apps in gmail

That’s been done already.

MAIL_CONFIGUARTION to true, and sendmail setup, maybe you dont have have smtp as your option in the settings panel? Think that would override the config. Not sure.

Smtp with gmail works fine for me.

Setting panel sendmail is set to smtp

Gonna need error logs to help any further.

Well…what should I check if error logs aren’t producing, as per my OP

Any error related to smtp, should show up in a stderr log.

I can confirm this behaviour. I am trying to send an email notification as well as a task via mail and both does not work. At least the latter one generates some log output but no errors! Mail is not sent!

[2019-08-01 21:03:19] [debug] Kanboard\Core\Controller\Runner::executeController => \Kanboard\Controller\TaskMailController::send
[2019-08-01 21:03:19] [debug] Kanboard\Core\Queue\QueueManager::push: Job executed synchronously: Kanboard\Job\EmailJob
[2019-08-01 21:03:19] [debug] Kanboard\Job\EmailJob::execute Sending email to: xxxx@xxxxx.net using transport: smtp
[2019-08-01 21:03:19] [debug] Kanboard\Job\EmailJob::execute Email sent in 0.086184 seconds
[2019-08-01 21:03:19] [debug] Kanboard\Core\Queue\QueueManager::push: Job executed synchronously: Kanboard\Job\CommentEventJob

I am trying to achieve sending mail now for hours. msmtp can send mails via the same settings kanboard couldn’t. This get’s really frustrating as kanboard would be the best solution for me but notifications are essential.
BTW, although configured to get notifications on all tasks I neither get them via web nor via mail

EDIT: I also disabled mail settings via web ui so there shouldn’t be a overwriting

Version: 1.2.10
PHP Version: 7.1.30-2+0~20190710.21+debian9~1.gbp011d3c
PHP SAPI: apache2handler
HTTP Client: cURL
OS Version: Linux 4.9.0-9-amd64
Datenbanktreiber: sqlite
Datenbank Version: 3.16.2
Browser: Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0

Just double checking, you’ve checked your spam?

just tested, works fine. the only contents of my config.php are: (get rid of any extra BS related to mail, to dumby proof it, and make sure you don’t have a config.php also in your data folder that could possibly be overriding the config.php in your app folder)

// We choose "smtp" as mail transport
define('MAIL_TRANSPORT', 'smtp');

// We define our server settings
define('MAIL_SMTP_HOSTNAME', 'smtp.gmail.com');
define('MAIL_SMTP_PORT', 587);

// Credentials for authentication on the SMTP server (not mandatory)
define('MAIL_SMTP_USERNAME', 'myemail@gmail.com');
define('MAIL_SMTP_PASSWORD', 'mypw');

define('MAIL_SMTP_ENCRYPTION', 'tls'); // Valid values are "null", "ssl" or "tls"
define('MAIL_FROM', 'projects@mydomain.com');

only extra step, was to turn on less secure apps in gmail.

feel free to mail yourself: https://projects.nachostudio.ml
admin/admin

if it’s not working, following those steps, it’s more likely the server configuration you have kanboard running on that is the issue and less likely that Kanboard is the issue.

in case you are wondering:

Configuration

Application version: v1.2.10
PHP version: 7.3.6
PHP SAPI: fpm-fcgi
HTTP Client: cURL
OS version: Linux 4.9.45-rancher
Database driver: sqlite
Database version: 3.28.0
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36

Thanks for your reply!
Unfortunately, my spam is empty and my config looks the same. I even upgraded my system to match yours:

Version: 1.2.10
PHP Version: 7.3.7-2+0~20190725.42+debian9~1.gbp848ca5
PHP SAPI: fpm-fcgi
HTTP Client: cURL
OS Version: Linux 4.9.0-9-amd64
Datenbanktreiber: sqlite
Datenbank Version: 3.16.2
Browser: Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0

Still not working.

BUT then I changed the mail provider to gmail to match your settings even more and suddenly it works! So there is an issue with my mail provider I’ll have to investigate :confused:

Thanks for your help!