Kavita now with self hosted email messaging

So the latest news is the Nightly version of Kavita uses email addresses for user accounts. And the developers have kindly included the default of using their email service to deliver invite emails etc. However they’ve also release a new docker container Kavitaemail which allows you to use your own SMTP settings. So I’ve updated my Kavita stack to have the email container in there as well. I’ve modified it based on some advice from Andrew in the Discord chat, so that we don’t expose the port. We just make the two containers talk to each other directly. Below is the Stack config I used to make this work. You have to run it once, then shut down the stack and then go edit the appsettings.json file in the kavitaemail container to have your SMTP settings. You ONLY need to set those settings, ignore the rest. Once you’ve saved that file. Fire up the stack again and go the the Admin Dashboard (General Tab) and enter http://kavita-email:5003 into the SMTP URL and hit save. Test it and then send a test email.

version: '3.9'
services:
  kavita:
    image: kizaing/kavita:nightly
    environment:
      TZ: "America/Chicago"   
    volumes:
      - /srv/dev-disk-by-label-3TB2/Media5/Ubooquity:/manga:ro

      - kavita:/kavita/config
    ports:
      - "5000:5000"
    networks:
            - default
            - kavita-email
    restart: unless-stopped
  
  kavita-email:
    image: kizaing/kavitaemail:latest
    volumes:
       - kavitaemailconfig:/app/config
    networks:
       - kavita-email
    restart: unless-stopped

volumes:
  kavita:
  services:
  kavitaemailconfig:
 
networks:
  kavita-email:

There’s been an update already… Chris, aka kizaing, updated the kavitaemail image to use Environment variables in the setup so that you don’t have to stop the container/stack and manually update the appsettings.json file. However, if you leave a space after the = sign it will break the setting and then the emails won’t work. If you do that, you must delete the volume or the appsettings.json file and recreate because an updated run of the Stack will not update the appsettings.json file. I personally use/prefer docker volumes for my persisting data, so that makes the process of fixing things fairly easy. You can edit the name of your kavitaemail docker volume from “kavitaemailconfig” to “kavitaemailconfig2” and then you can delete the original volume.
The example of my stack is below. Just exchange the important bits with your information. And you still need to got to Kavita’s settings and add the http://kavita-email:5003 to the SMTP URL box.

version: '3.9'
services:
  kavita:
    image: kizaing/kavita:nightly
    environment:
      TZ: "America/Chicago"   
    volumes:
      - /srv/dev-disk-by-label-3TB2/Media5/Ubooquity:/manga:ro

      - kavita:/kavita/config
    ports:
      - "5000:5000"
    networks:
            - default
            - kavita-email
    restart: unless-stopped
  
  kavita-email:
    image: kizaing/kavitaemail:latest
    environment:
      - SMTP_HOST=mail.smtp.com
      - SMTP_PORT=587
      - SMTP_USER=username
      - SMTP_PASS=password
      - SEND_ADDR=youremail@example.com
      - DISP_NAME=Kavita Email
    volumes:
       - kavitaemailconfig:/app/config
    networks:
       - kavita-email
    restart: unless-stopped

volumes:
  kavita:
  services:
  kavitaemailconfig:
 
networks:
  kavita-email:

Hi there. I have a kavita running on Docker on my Synology NAS, and I have tried to use my own email notification service via smtp and works smooth, but when I reverse proxy my Kavita’s docker container to use with https, my email service stops working. Https is set up as explained by Marius hosting at

I would really appreciate to use my own email service, and https too. Do you have any ideas on how to do so? Will it be added https support?
Kind regards,
Frank

Well I can say that it definitely does work with https behind a reverse proxy. That’s exactly what I’m doing. However I’m not running it from a Synology. What is the reverse proxy you are using? Honestly because there are folks using a Synology in the Discord, that might be the better place to ask the question to see how others are doing it. Hopefully you haven’t identified some bug.

For anyone interested there have been some changes in the settings for using Kavita Email for selfhost emails and Send to Kindle functions.
A note regarding Send to Kindle functions. If you don’t want to see the annoying emails from Kindle asking you to approve each file, make sure you are not spoofing the email address in the config below. Kindle’s servers can tell and will flag it for the security check email. So send from the same address you actually use below and ensure it’s an authorized sender in you Amazon Kindle settings. To get there you can Login to Amazon, go to the Kindle page and search Manage Your Content and Devices, go to Preferences, then Personal Document Settings, at the bottom click Add a new approved email address. If there’s still an issue, edit your Send to Kindle Email settings in that same area. Click the Edit button next to the device you want to send to and change the email to something other than the standard username-random@kindle.com

Kavita plus Kavita email config

version:'3.9'
services:
  kavita:
    image: kizaing/kavita:nightly
    environment:
    TZ: "America/Denver"   
  volumes:
      - /mnt/kavita/mangafolder:/manga:ro
      - kavita:/kavita/config
    ports:
      - "5000:5000"
    networks:
            - default
            - kavita-email
    restart: unless-stopped
  
  kavita-email:
    image: kizaing/kavitaemail:latest
    environment:
      - SMTP_HOST=mail.smtp.com
      - SMTP_PORT=587
      - SMTP_USER=usernamehere
      - SMTP_PASS=passwordhere
      - SEND_ADDR=email@yourhostname.com
      - DISP_NAME=Kavita Email
      - ALLOW_SENDTO=true
    volumes:
       - kavitaemailconfig:/app/config
    networks:
       - kavita-email
    restart: unless-stopped

volumes:
  kavita:
  kavitaemailconfig:
 
networks:
  kavita-email: