“Save & Send Test Email” should call the alterMailParams hook to replicate live conditions
Clicking “Save & Send Test Email” on the Outbound Mail settings doesn't replicate live conditions. It doesn't call the alterMailParams hook like live does (maybe other things too). It should.
I've been assigning the From
address in the hook so that it overrides what is entered and thus can ensure it matches the sending domain configured for SMTP. The emails go out fine, but "Save & Send Test Email" can fail because the default "From Address" (on the list of from addresses) doesn't match the sending domain.