formbricks / formbricks

Open Source Survey Platform
https://formbricks.com
Other
5.9k stars 953 forks source link

[FEATURE] Option to Disable Mail #2767

Closed jonas-hoebenreich closed 8 hours ago

jonas-hoebenreich commented 1 week ago

Is your feature request related to a problem? Please describe.

We do not have Mail configured and do not wish to configure it as we do not see the additional value. Currently, our logs are getting spammed with messages like: Could not Email :: SMTP not configured :: [...] This clutter makes it harder to identify other important log messages.

Describe the solution you'd like

Introduce a new environment variable, DISABLE_MAIL. When this variable is set:

Benefits:

Describe alternatives you've considered

No response

Additional context

No response

devsargam commented 1 week ago

Hey if this issue is valid can I work on it @jonas-hoebenreich?

mattinannt commented 1 week ago

@jonas-hoebenreich makes sense.

@devsargam Thanks for offering your help :-) I will assign you to the issue :-) We already have a IS_SMTP_CONFIGURED variable in packages/email/index.tsx that could be used for these checks. We just need to make sure in the sendEmail function that we don't print the error. It should be an easy fix :-)

devsargam commented 1 week ago

Hey @mattinannt, what is the ideal thing to do?

image

Should I remove the else part? or is there some other desired result?

jonas-hoebenreich commented 1 week ago

I personally would just remove the else clause. And it would be great to have a notice in the notification settings: image

devsargam commented 1 week ago

Thanks @jonas-hoebenreich this helps raising a pr with the fix you wanted :)

mattinannt commented 4 days ago

@devsargam How is the development going. When do you think you will be able to open a PR for it? :-)

devsargam commented 4 days ago

Hey @mattinannt was waiting for your input? Is the approach discussed correct?

mattinannt commented 1 day ago

@devsargam Yes, just deleting the else case should be the way to go :-) Thanks for raising a PR 💪🚀