Skip to content

Commit

Permalink
Remove Reply-to as a configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
neoformit authored and cat-bro committed Feb 1, 2024
1 parent dc9c8b6 commit 4e2c239
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 29 deletions.
12 changes: 0 additions & 12 deletions doc/source/admin/galaxy_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1620,18 +1620,6 @@
:Type: str


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``error_email_reply_to_user``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:Description:
When sending email reports for tool errors, include the user's
email address in the Reply-to SMTP header (used by some ticketing
systems to identify the appropriate response address).
:Default: ``None``
:Type: bool


~~~~~~~~~~~~~~
``email_from``
~~~~~~~~~~~~~~
Expand Down
5 changes: 0 additions & 5 deletions lib/galaxy/config/sample/galaxy.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -1111,11 +1111,6 @@ galaxy:
# user may encounter.
#error_email_to: null

# When sending email reports for tool errors, include the user's email
# address in the Reply-to SMTP header (used by some ticketing systems
# to identify the appropriate response address).
#error_email_reply_to_user: false

# Email address to use in the 'From' field when sending emails for
# account activations, workflow step notifications, password resets,
# and tool error reports. We recommend using a string in the
Expand Down
8 changes: 0 additions & 8 deletions lib/galaxy/config/schemas/config_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1159,14 +1159,6 @@ mapping:
set. Also this email is shown as a contact to user in case of Galaxy
misconfiguration and other events user may encounter.
error_email_reply_to_user:
type: bool
required: false
desc: |
When sending email reports for tool errors, include the user's email address
in the Reply-to SMTP header (used by some ticketing systems to identify the
appropriate response address).
email_from:
type: str
required: false
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tools/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def _send_report(self, user, email=None, message=None, **kwd):
except Exception:
pass

reply_to = user.email if self.app.config.error_email_reply_to_user else None
reply_to = user.email if user else None
return util.send_mail(
self.app.config.email_from,
to,
Expand Down
6 changes: 3 additions & 3 deletions lib/galaxy/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1543,6 +1543,9 @@ def send_mail(frm, to, subject, body, config, html=None, reply_to=None):
msg["From"] = frm
msg["Subject"] = subject

if reply_to:
msg["Reply-To"] = reply_to

if config.smtp_server is None:
log.error("Mail is not configured for this Galaxy instance.")
log.info(msg)
Expand All @@ -1554,9 +1557,6 @@ def send_mail(frm, to, subject, body, config, html=None, reply_to=None):
msg.attach(mp_text)
msg.attach(mp_html)

if reply_to:
msg["Reply-To"] = reply_to

smtp_ssl = asbool(getattr(config, "smtp_ssl", False))
if smtp_ssl:
s = smtplib.SMTP_SSL(config.smtp_server)
Expand Down

0 comments on commit 4e2c239

Please sign in to comment.