getmeli / meli

Platform for deploying static sites and frontend applications easily. Automatic SSL, deploy previews, reverse proxy, and more.
Other
2.4k stars 97 forks source link

Configurable email credentials per site #229

Open tanc opened 3 years ago

tanc commented 3 years ago

I'm maybe not understanding exactly how the forms functionality works, but it seems like sending email is restricted to a single mail account, the one set up that Meli uses for sending admin emails.

With potentially many sites/domains on a single Meli instance it would be useful to allow them to send mail through their choice of SMTP server.

It would be handy to be able to configure a site's forms to use specific mail host and credentials rather than it all getting piped through MELI_MAIL_HOST

gempain commented 3 years ago

This makes sense. We'd need to add a form to the site's setting page, and then load email config dynamically.

tanc commented 3 years ago

Would it make sense to extend the existing 'forms' form to include the host and credentials field? That way when using the API to send the email the credentials can be dynamically checked and maybe fall back to the Meli defaults.

gempain commented 3 years ago

Forget what I said. As you say, we just need to extend the "forms" form (weird to say haha) and can fallback to the defaults when that info is not given. We will need to refactor a bit the email logic.