sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.15k stars 210 forks source link

Emails are sent from the "help" address instead of "SMTP server FROM" #6772

Open crockeea opened 1 year ago

crockeea commented 1 year ago

When using SMTP, I would like emails to be sent from a generic, unmonitored server address (e.g., help@mycocalc.com), but provide an monitored inbox for "help".

Currently, the "SMTP server FROM" address does not appear to be used by CoCalc. Instead, emails like the password reset emails are sent from the "help" address. See, e.g., https://github.com/sagemathinc/cocalc/blob/994134a4eb975111d980b4e0fddefe2af94b2cb8/src/packages/hub/password.coffee#L160

This unexpected behavior is confusing because you have to set the "help" email address to a domain from which your SMTP server can send emails.

haraldschilly commented 1 year ago

Just FYI, this is "old code" and IMHO all of this should go away. There is another implementation for password reset emails, which use the "FROM" setting. At least, as far as I can tell from looking at the line of code here

I started to look into converting these emails – and others in the future – to a simple customizable templating system and a more general setup. Part of that, I guess I should look into getting rid of this code.