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

[bug]: Self-host setup, EMAIL_FROM from env file is not used #3123

Closed
1 task done
olivierlambert opened this issue Dec 13, 2023 · 7 comments · Fixed by #3155
Closed
1 task done

[bug]: Self-host setup, EMAIL_FROM from env file is not used #3123

olivierlambert opened this issue Dec 13, 2023 · 7 comments · Fixed by #3155
Assignees
Labels
🐛bug Something isn't working

Comments

@olivierlambert
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

Editing the .env file to put:

EMAIL_FROM="My team <[email protected]>"

Then restarting/stopping & starting or even full reboot: my message is always rejected because the "from" is always [email protected] regardless the content of EMAIL_FROM in my .env file.

However, the rest is correctly taken into account, because it goes to the right SMTP server via user/password, TLS and such. Only the EMAIL_FROM is ignored.

Steps to reproduce

  1. Change the .env file to use a "custom" EMAIL_FROM
  2. Restart the containers
  3. Send an email
  4. Always using the default EMAIL_FROM

Browser

Mozilla Firefox

Version

Self-hosted

@olivierlambert
Copy link
Author

I think I might have a lead:

  1. If I clean the email config in God mode, emails aren't sent anymore
  2. So it's probably that the .env file isn't used to send emails, so it would be then needed to update the /god-mode/email UI to add a "from" field so it's took into account.

@Heucles
Copy link

Heucles commented Dec 15, 2023

You are correct, if you go into the file inside the container:

 docker exec -it plane-app-worker-1 /bin/bash

 vi plane/bgtasks/workspace_invitation_task.py 

and hard code your EMAIL_FROM like this

        msg = EmailMultiAlternatives(                                                                                              
            subject=subject,                                                                                                       
            body=text_content,                                                                                                     
            from_email="[email protected]",                                                                 
            to=[email],                                                                                                            
            connection=connection,                                                                                                 
        )                                                                                                                          
        msg.attach_alternative(html_content, "text/html")                                                                          
        msg.send()                                                           
                      

I works!!!

@pablohashescobar pablohashescobar added the 🐛bug Something isn't working label Dec 15, 2023
@pablohashescobar
Copy link
Collaborator

Thanks for flagging this we will push a patch soon.

@olivierlambert
Copy link
Author

\o/ Thanks for the hint, and I'm happy to see I spotted an actual issue, helping you guys to make a better product. Congrats again for this excellent project 👍

@olivierlambert
Copy link
Author

I followed @Heucles instructions, and I confirm it worked (as a quick'n'dirty workaround)

@vihar
Copy link
Contributor

vihar commented Dec 18, 2023

@olivierlambert, this issue has been fixed on our latest release, v0.14.1-dev. If you're seeing any issues, please let us know.

@vihar vihar closed this as completed Dec 18, 2023
@olivierlambert
Copy link
Author

I can confirm it's fixed! Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants