Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email Invite not working #1761

Open
gader-abdollah opened this issue Apr 17, 2024 · 1 comment
Open

Email Invite not working #1761

gader-abdollah opened this issue Apr 17, 2024 · 1 comment

Comments

@gader-abdollah
Copy link

Screenshot from 2024-04-17 13-06-13

The player fails to send email invites to users

To reproduce

  1. Go to Users > Invite
  2. Enter a single email such as abc@example.com
  3. Leave admin role unchecked
  4. See Unknown error

Environment

  • Koel version v6.12.1
  • Server OS: Ubuntu via Portainer
  • Laptop OS: Fedora 39
  • Browser: Firefox 124.0.1 (64-bit)
  • PHP version 8.1.8

Additional context
I did not test with multiple emails as I only need to send an invite to a single person.
Here is the stack I used:

version: '3'

services:
  koel:
    image: phanan/koel
    restart: always
    depends_on:
      - database
    ports:
      - some_port:80
    environment:
      - FORCE_HTTPS=true
      - SPOTIFY_CLIENT_ID=ehem
      - SPOTIFY_CLIENT_SECRET=ehem
      - YOUTUBE_API_KEY=ehem
      - LASTFM_API_KEY=scusi
      - LASTFM_API_SECRET=eeeeeeeeeh_nope
      - DB_CONNECTION=*****
      - DB_HOST=******
      - DB_USERNAME=*****
      - DB_PASSWORD=*******
      - DB_DATABASE=******
    volumes:
      - music:/music
      - covers:/var/www/html/public/img/covers
      - search_index:/var/www/html/storage/search-indexes


  database:
    image: mariadb:10.11
    restart: always
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=*****
      - MYSQL_DATABASE=*****
      - MYSQL_USER=*****
      - MYSQL_PASSWORD=******

volumes:
  db:
    driver: local
  music:
    driver: local
  covers:
    driver: local
  search_index:
    driver: local

Once it was up, I ran these commands:

php artisan koel:init --no-assets && apt update && apt dist-upgrade -y && apt install inotify-tools -y
echo '#!/bin/bash

MEDIA_PATH=/music

inotifywait -rme move,close_write,delete --format "%e %w%f" $MEDIA_PATH | while read file; do
  php artisan koel:sync "${file}"
done' > watch
chmod +x watch && ./watch & disown -h

This is the initial setup with watch setup.

I have no idea why it is not working. Maybe it cannot send emails in general ?
Anyway, it is also running behind Nginx Proxy Manager but the connection is coming through no problem...
Is there a need to open more ports for email sending maybe ??

@roccolate
Copy link

roccolate commented Apr 30, 2024

Hi, i was having the same issue, let me share what i did to fix it:

in the .env file take a look at this lines:

# The following settings are for Koel to send emails, for example to send user invitations and reset passwords. MAIL_FROM_ADDRESS="hello@example.com" MAIL_FROM_NAME="${APP_NAME}" MAIL_MAILER=smtp MAIL_HOST=mailhog MAIL_PORT=1025 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null

make sure you complete that part, i used my websites email, created music@mywebsite.com, added a password and used SMTP . i added those details to the file and that fixed my error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants