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

Testing SMTP #47

Closed
djyde opened this issue Apr 24, 2021 · 3 comments
Closed

Testing SMTP #47

djyde opened this issue Apr 24, 2021 · 3 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed PR welcome server

Comments

@djyde
Copy link
Owner

djyde commented Apr 24, 2021

I implemented SMTP for self-host service. But it doesn't work well when I tested it with Gmail. I don't have time to test this feature yet. If someone is interested in it, feel free to contribute.

Related code: https://github.com/djyde/cusdis/blob/master/service/notification.service.ts#L94

@djyde djyde added good first issue Good for newcomers help wanted Extra attention is needed server PR welcome labels Apr 24, 2021
@frostming
Copy link
Contributor

frostming commented Apr 26, 2021

I tested with a QQ exmail and it works smoothly. Gmail is similar but has a stricter access policy: https://nodemailer.com/usage/using-gmail/. TLDR; users should either allow the "less secure apps" to access or set up an app-specific auth with 2FA enabled.

I think we should expose the interface for custom Email first and instruct users how to correctly set up a (user, pass) pair for this kind of mail service.

UPDATE: I set up an app-specific password for Gmail and it works.

@djyde
Copy link
Owner Author

djyde commented Apr 26, 2021

I tested with a QQ exmail and it works smoothly. Gmail is similar but has a stricter access policy: https://nodemailer.com/usage/using-gmail/. TLDR; users should either allow the "less secure apps" to access or set up an app-specific auth with 2FA enabled.

I think we should expose the interface for custom Email first and instruct users how to correctly set up a (user, pass) pair for this kind of mail service.

UPDATE: I set up an app-specific password for Gmail and it works.

Wow that's surprised me that the code I never test works fine 🤣

I thought about instead of passing these env vars about SMTP, we could provide a settings panel for SMTP settings and save theme in the database. It's more user-friendly and we could provide more built-in preset later.

@djyde
Copy link
Owner Author

djyde commented Apr 26, 2021

@frostming I completed the documentation https://cusdis.com/doc#/features/notification?id=self-host

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed PR welcome server
Projects
None yet
Development

No branches or pull requests

2 participants