Open mdeuk opened 1 year ago
Yeah, this is a bit of a gotcha in that the To
address is currently dynamically calculated, not cached at the time of sending. It hasn't really been a problem since we didn't render it so obviously, but indeed, now that we do present it it's a bit confusing in the cases that it's wrong. Had a similar issue in diagnosing https://github.com/mysociety/asktheeu-theme/pull/122 with some of the IncomingMessage
address fields.
I think to fix we need to:
When #7390 was implemented, the
To
,From
, andSubject
fields from outgoing messages became visible in the respective admin page. This is very useful, but, there does appear to be a slight issue.Looking at outgoing message 1365974 on WDTK, the email address rendered there is the current email address for the body, but not the one that we sent the message to.
Expected behaviour
The
From
email address shown should match the one shown in theParams yaml
of the respective event (13205224), e.g.contactcentre@
Actual behaviour
The
From
email address shown is the one configured in Alaveteli as the mailbox to send new requests to (dataprotection@
).This will be correct in many cases, but it doesn't take into account an instance such as this - where the email address for the public body has changed in the period between the message being sent and the change being made.