Allow to customize email fields on test page

Created on 18 September 2023, over 1 year ago
Updated 20 September 2023, over 1 year ago

Problem/Motivation

Please, allow the modification of Sender in the test settings. While we can change it when actually sending the message from code, we can't do so on the test page, so the site-wide e-mail address has to be changed temporarily for a test with a different sender.

Feature request
Status

Active

Version

1.3

Component

Code

Created by

🇭🇺Hungary djg_tram

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @djg_tram
  • 🇬🇧United Kingdom adamps

    NB You could already set the sender for all test messages using mailer policy. So this issue is for customising fields for only this test message. It's a good idea and we can allow customization of any field, not just the sender.

    I think the best way to do it is somehow to include PolicyEditForm which does exactly what we want.

  • 🇭🇺Hungary djg_tram

    As far as I can tell, From can be changed but Sender can't.

  • 🇬🇧United Kingdom adamps

    Yes you are right. This limitation was a design choice, and it is general to this module, not specific to just the test page.

    This answer has plus some background plus snippets from the RFC:

    • From Specifies the author(s) of the message; that is, the mailbox(es) of the person(s) or system(s) responsible for the writing of the message. Defined as standard by RFC 822.
    • Sender Specifies the mailbox of the agent responsible for the actual transmission of the message. Defined as standard by RFC 822.

    So my understanding is that application code should set From, but the Sender should come from site configuration. Currently the sender can be changed in code but not in the UI. I'm happy to discuss whether this should be changed, but I guess it would be better on a separate issue as this one has gone in a different direction.

  • 🇭🇺Hungary djg_tram

    Yes, I'd very definitely vote for the possibility. In my current case, the website owner prefers a gmail address for the site so that any system correspondence goes there. But when he tries to send e-mails from the site to his customers, the Sender and From have to use the same domain the site is running on or else the SPF will not match and services like Gmail itself will simply consider it spam and drop it silently.

  • 🇬🇧United Kingdom adamps

    OK then as I said please raise a separate issue (and if I'd appreciate it if you copy my doubts below in)

    However I have my doubts as

    1) The description for the site mail field says this:

    The From address in automated emails sent during registration and new password requests, and other notifications. (Use an address ending in your site's domain to help prevent this email being flagged as spam.)

    2) AFAIK it isn't possible to configure sender in the GUI in other similar modules

Production build 0.71.5 2024