Collecting Module - Email address

I am the overall Global Administrator for our Omeka S install (because I am the IT person responsible for the server). One of our sites is using the Collecting module. Any time a submission is made, the email sent is coming from my email address.

How do I change the From email address that the Collecting module is using?

If you go to Settings in the left-hand admin navigation, there’s a setting “Administrator email” that controls that address.

That’s the administrator email for the entire Omeka site though.

Is there no way to change the From address for the Collecting module?

There is currently no way to do this. We’ll look into making it possible but it may take some time. In the meantime you can make a simple change to this file:

<omeka>/module/Collecting/src/Controller/Site/IndexController.php

In IndexController::sendSubmissionEmail() change this line from:

$message = $this->mailer()->createMessage()

To this:

$message = $this->mailer()->createMessage(['from' => 'you@example.com'])

Thanks Jim. That fixed it.

It would be nice though if a feature could be added to change the From address from within the module. It would be fantastic if it was on a per site basis, so that if two sites were using the Collecting module both could use their own address.

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.