This is just an informative post for an issue I came across today regarding the “From” email address. I know others have had this issue in the past, but I think the most recent post is over a year old so I can’t reply to it anymore.
In Omeka S, system emails typically come from the Administrator email set in the Global Settings (as mentioned in the post linked above).
In our case, we don’t want the From address to be the Administrator email address. This is because we use an email service to send emails tied to the Omeka S domain that has DKIM and SPF configured and is not the same as the Administrator email domain. I could go into more detail on this if anyone is interested.
An example use case is the Contact Us module which will now send notifications to the Administrator email address (user@gmail.com) from our email service provider address (noreply@our-omeka-s-domain.org).
To accomplish this, we have configured the mail key in the local.config.php file and additionally added the undocumented default_message_options key:
'mail' => [
'default_message_options' => [
'from' => 'noreply@our-omeka-s-domain.org',
],
'transport' => [
'type' => 'smtp',
'options' => [
...
],
],
],
This allows Administrators to receive system notifications while also ensuring excellent email deliverability.