I recently installed Kanboard v1.2.41 using Docker on a new server, and then I transferred the data, files, and users from the old server’s Kanboard v1.2.18. The transferred data is saved in two files: kanboard_backup.sql and kanboard_files_backup.tar.gz. I have now imported all the data into the new Kanboard v1.2.41 using these backup files. I want to use the SMTP email feature in Kanboard v1.2.41. Below is an image showing the SMTP settings in my config.php file:
After completing the configuration, I tried sending an email from Kanboard v1.2.41. Although I received the message “Task sent by email successfully,” no emails were received in the inbox. Could you help me identify where the problem might be ?
I’m so sorry, Mr. alfredb, but I’m not sure what you mean by ‘Unset MAIL_TRANSPORT and MAIL_BCC.’ Does this mean I should just comment out these two variables as shown in the figure below? If you don’t mind, could you show me the SMTP configuration from your config.php file?
Could you let me know which version of Kanboard you’re using? If possible, could you share it with me? Is there a possibility that this could be a version compatibility issue?
You mentioned that ‘the recipient must have a valid email set in his profile.’ Are you referring to the email in the ‘Summary’ section of ‘My profile’ in Figure 2? Then, in Figure 3, under Settings → Email Settings, what should I enter for the Email field? (My account in Kanboard is Administrator).
I am currently reviewing the internal SMTP settings, and I will attach the relevant PHP code related to SMTP in my subsequent replies. Could you please help me check if there are any issues?
Let me know if you’d like any adjustments or further help!
I’m’ using version 1.2.42, as well as some of the last recent versions,
without any problems, BTW.
Correct, this is your personal email as user/administrator.
At Fig. 3, this emails is used as sender for any mail sent by Kanboard. Use want you want and is accepted by your mail server.
Regarding the SMTP code internals: I think this code wasn’t changed for months or even years. It simply works as expected, and I strongly doubt that there is a problem related to your issue.
As I said, I’m not a docker expert. But out of curiosity, I tried to set up a Kanboard site with docker, including the targeted SMTP mail transport. As expected, mailing via SMTP works like a charm.
This brings me to a possible cause:
AFAIK, you must not deal with config.php. Add your required settings to the docker-compose.yml file, under services > kanboard > environment.
After reading your reply, I have a few more questions:
Since you mentioned that after setting up Kanboard using Docker (version 1.2.42, correct?), you were able to configure SMTP for email sending, could you please provide the system specifications of the computer you used (e.g., operating system, CPU, etc.), and the process you followed to set up Kanboard with Docker? I would like to know all the commands (history) you ran during the setup. You can check the history of commands by running history on the server (terminal), which should show all the commands executed during the installation of Kanboard. Could you please send me a screenshot of those commands along with your docker-compose.yml file?
(My Kanboard installation process was: First, I ran “docker pull kanboard/kanboard”, then I wrote my own docker-compose.yml file, followed by “docker-compose up -d” to bring up Kanboard. After that, I imported the data, files, and user accounts into Kanboard as shown in the image. For the data, plugins, config.php, and MariaDB, I first placed them on the host machine and then mapped them to the corresponding folders in Docker.)
If I modify the content in the config.php file, do I need to restart Docker using docker restart kanboard or docker-compose restart kanboard?
Kanboard should have logs for email sending. Where would these logs be stored in Docker? If I check these logs, will they show what went wrong with the SMTP email sending?
Thanks for your reply, Mr.alfredb. Here are my questions:
Below is my current full docker-compose.yml files. Could you show me your full docker-compose.yml file? I would like to know what is difference between your kanboard settings and mine.
I’ve found debug.log file in docker kanboard. I tried to send an email by kanboard via smtp. Kanboard still replied me ‘task sent by email successfully’, but my email hasn’t received any mail yet. The following figure is the error after I send an email by kanboard (in the debug.log file):
I’ve found a new docker named mailserver. Can we use mailserver to send an email in kanboard. How to combine these two dockers?
My current kanboard version is v 1.2.41. Should I tried these revisions above in the latest version v1.2.42 ?
I don’t know what to do to enable kanboard mail function. Should I revise SMTP code internals? Should I change kanboard to the latest version? Should I add more settings in my docker-compose.yml file?
For the new questions:
2) Make sure, your DNS works.
3) Forget it, unneeded.
4) If you’d like to, but not a requirement.
5) Don’t touch, not required if you use the original Kanboard image.
From the beginning, I had a suspect that your SMTP server didn’t a good job. Now I took a closer look.
First try with email command line client.
Connecting to server ct-cloud.com.tw on port 587
Greeting the SMTP server...
email: FATAL: Smtp error: Lost connection with SMTP server
Second, try with telnet.
$ telnet ct-cloud.com.tw 587
Trying 211.21.6.81...
Connected to ct-cloud.com.tw.
Escape character is '^]'.
220 ct-cloud.com.tw ESMTP Postfix
EHLO local.domain.name
250-ct-cloud.com.tw
250-PIPELINING
250-SIZE 102400000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250 CHUNKING
AUTH PLAIN
503 5.5.1 Error: authentication not enabled
AUTH LOGIN
503 5.5.1 Error: authentication not enabled
AUTH CRAM-MD5
503 5.5.1 Error: authentication not enabled
MAIL FROM: kanboard@ct-cloud.com.tw
250 2.1.0 Ok
RCPT TO: kanboard@ct-cloud.com.tw
554 5.7.1 <211-21-6-81.hinet-ip.hinet.net[211.21.6.81]>: Client host rejected: Access denied
QUIT
221 2.0.0 Bye
Connection closed by foreign host.
No authentication is enabled AUTH PLAIN 503 5.5.1 Error: authentication not enabled AUTH LOGIN 503 5.5.1 Error: authentication not enabled AUTH CRAM-MD5 503 5.5.1 Error: authentication not enabled
Server denies any RCPT, even to the sender. RCPT TO: kanboard@ct-cloud.com.tw 554 5.7.1 <211-21-6-81.hinet-ip.hinet.net[211.21.6.81]>: Client host rejected: Access denied
Either fix your SMTP server first, or try with a known working server you have access to.
IMHO, this SMTP server looks misconfigured, there is no auth method enabled, and it doesn’t accept any mail for sending. Unfortunately, I have no experience of configuring postfix. Please ask whoever is responsible for this server.
Thanks for your help , Mr.alfredb. It’ll be really really helpful if you’re willing to demo the process of how to make the mail function work with kanboard version 1.2.41.
If you don’t mind, please show your step detailedly(every command you execute in the server
). Thanks!