Hello,
I am following this video for installing Vikunja. I seem to be having issues with the mailer not working. Using the testmail command gives the following output
2023/08/27 03:05:08 No config file found, using default or config from environment variables.
2023-08-27T03:05:08.198289119-04:00: INFO ▶ cmd/func10 001 Sending testmail...
2023-08-27T03:05:08.198574733-04:00: WARNING ▶ mail/SendTestMail 002 Mailer seems to be not configured! Please see the config docs for more details.
2023-08-27T03:05:08.198590301-04:00: INFO ▶ cmd/func10 003 Testmail successfully sent.
The docker-compose file is from the link > Setup Vikunja using Do... | The Homelab Wiki
I feel like its not grabbing the set env variables that is set in the docker compose for some reason. Any assistance is appreciated. I am new to linux and docker
Can you share your config? How are you running the testmail command?
I use the command like vikunja testmail email
Config below,
version: '3'
services:
db:
image: mariadb:10
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: supersecret
MYSQL_USER: vikunja
MYSQL_PASSWORD: secret
MYSQL_DATABASE: vikunja
volumes:
- ./db:/var/lib/mysql
restart: unless-stopped
api:
image: vikunja/api
environment:
VIKUNJA_DATABASE_HOST: db
VIKUNJA_DATABASE_PASSWORD: secret
VIKUNJA_DATABASE_TYPE: mysql
VIKUNJA_DATABASE_USER: vikunja
VIKUNJA_DATABASE_DATABASE: vikunja
VIKUNJA_SERVICE_ENABLETASKATTACHMENTS: 1
VIKUNJA_SERVICE_ENABLEREGISTRATION: 1
VIKUNJA_SERVICE_ENABLEEMAILREMINDERS: 1
VIKUNJA_MAILER_ENABLED: 1
VIKUNJA_MAILER_FORCESSL: 1
VIKUNJA_MAILER_HOST: smtp.gmail.com
VIKUNJA_MAILER_PORT: 465
VIKUNJA_MAILER_USERNAME: mygmail@gmail.com
VIKUNJA_MAILER_PASSWORD: mygmailpass
volumes:
- ./files:/app/vikunja/files
depends_on:
- db
restart: unless-stopped
frontend:
image: vikunja/frontend
restart: unless-stopped
proxy:
image: nginx
ports:
- 8022:80
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- api
- frontend
restart: unless-stopped
Ah okay, I think it seems to be working now with the replies on that post. I ended up doing
VIKUNJA_MAILER_FORCESSL: 0
VIKUNJA_MAILER_PORT: 587
VIKUNJA_MAILER_AUTHTYPE: plain
and using command
docker exec -it vikunja_api_1 /app/vikunja/vikunja testmail myemail@gmail.com
and it sent the test mail. The tasks doesnt seem to show up though. I think the time zone seems not correct. I set a reminder for 10m from when I set it and once it went overdue it said it was due 4 hours ago. I have set the variable for VIKUNJA_DEFAULTSETTINGS_TIMEZONE to America/New_York but it still seems off. Any thoughts?
Did you set a reminder or a due date?
What did you configure as your own time zone? (in the user settings)
I set both
The same, I had US/Eastern before, before it was on GMT I didnt notice but then I switched it to US/Eastern and then to America/New_York to match

Can you enable debug logs and check the logs around the time you’re expecting the reminder to be sent?
Apologies for waking this oldish thread, but I am having similar issues using Microsoft 365 for email notifications. I think we need a better guide for setting up email which can cover some of these common pitfalls.
I know my configuration can work because I use smtp-mail.outlook.com for other internal services, but haven’t yet been able to make it work with Vikunja.
I found a couple of errors in the logs which, based on other threads here, led me to turn off forcessl and set the auth type to “login”. Those aren’t what I would have expected since as far as I know Microsoft SMTP definitely requires starttls. Anyway, I no longer see any errors in the logs but no emails are sent.
Does anyone have a reference to a more comprehensive write up, especially if it talks about O365 specifically?
Thanks.
Using the testmail command, does it appear as if the mail was sent successfully?
Apologies, I do have this working now. My test was insufficient. I was expecting an email when a task is assigned but that seems not to be a feature. I am now receiving emails for reminders. Microsoft 365 mailing does work with the following settings.
VIKUNJA_SERVICE_ENABLEEMAILREMINDERS: 1
VIKUNJA_MAILER_ENABLED: 1
VIKUNJA_MAILER_FORCESSL: 0
VIKUNJA_MAILER_HOST: smtp-mail.outlook.com
VIKUNJA_MAILER_PORT: 587
VIKUNJA_MAILER_USERNAME: xx@xx.xx
VIKUNJA_MAILER_PASSWORD: xx
VIKUNJA_MAILER_AUTHTYPE: login
VIKUNJA_MAILER_FROMEMAIL: xx@xx.xx
1 Like