openlibhums / janeway

A web-based platform for publishing journals, preprints, conference proceedings, and books
https://janeway.systems/
GNU Affero General Public License v3.0
172 stars 65 forks source link

Hardcoded `noreply@journal.com` reply address #4339

Open tp971 opened 2 months ago

tp971 commented 2 months ago

Describe the bug When sending a submission, the email with the subject "New Submission for Editor" has a hard-coded email-address of f"noreply{settings.DUMMY_EMAIL_DOMAIN}". The error seems to be in send_submission_acknowledgement in src/utils/transactional_emails.py: https://github.com/BirkbeckCTP/janeway/blob/1d254f3b7625ff698bdb2247e1115bd3841edc3b/src/utils/transactional_emails.py#L501

In our case, we could fix the issue by just removing that line.

Janeway version Current master (1d254f3b7625ff698bdb2247e1115bd3841edc3b)

ajrbyers commented 2 months ago

I don think this issue is actually a bug. Its been done on purpose. We could consider swapping the value for something better like the from_address setting.

tp971 commented 2 months ago

Well, if I just omit that line, it uses the replyto_address set for the journal, which I would think is the intended behaviour, especially since every other email does not use the hard-coded address (i.e. every other call to send_email_with_body_from_setting_template in the entire project does not set the custom_reply_to except for that one).

ajrbyers commented 2 months ago

Well, if I just omit that line, it uses the replyto_address set for the journal, which I would think is the intended behaviour, especially since every other email does not use the hard-coded address (i.e. every other call to send_email_with_body_from_setting_template in the entire project does not set the custom_reply_to except for that one).

send_submission_acknowledgement is definitely a special case where we didn't want the author's email to be used in the reply to. Here is the commit that made the change. The reasoning is in this PR: https://github.com/BirkbeckCTP/janeway/pull/3312

tp971 commented 2 months ago

Okay, but then I would still appreciate it if the Journal's replyto_address was used instead of the hard-coded one. The reason for that btw is that our email server denies sending emails with the hard-coded reply-to address.