I’m attempting to use SMTP auth with one of our MS Exchange mailboxes. So I’ve configured my local.config like:
'mail' => [ 'transport' => [ 'type' => 'smtp', 'options' => [ 'name' => 'smtp.office365.com', 'host' => 'smtp.office365.com', 'port' => 587, 'connection_class' => 'login', 'connection_config' => [ 'username' => 'email@example.com', 'password' => 'examplePassword', 'ssl' => 'tls', 'use_complete_quit' => true, ], ], ], ],
Omeka can successfully connect with the SMTP server, except the sender address needs to match the SMTP mailbox. Response from the SMTP server is SendAs Denied.
For example the sender for the password recovery emails is the same address as the recipient. So, for this configuration to work I would need to alter the sender of all Omeka messages to
Based on Laminas documentation, I’ve tried inserting this into the mail array:
'mail' => [ 'message' => [ 'setFrom' => 'firstname.lastname@example.org', ], 'transport' => [ ...etc.
Is it possible to force the email sender address from the config file? Or another method?