Unable to send emails

Hello,

I have Omeka S 4.1.1 on a shared cloud service. I have a SMTP account and have set up all the MX/SPF/DKIM stuff in place. Indeed, I can send via my hosting’s webmail interface. I can’t send anything via Omeka though. I keep getting

2025-01-06T11:34:30+00:00 ERR (3): Laminas\Mail\Protocol\Exception\RuntimeException: Message rejected. gla.ac.uk is not currently owned by sender
 in /home/customer/www/boslit.glasgow.ac.uk/public_html/vendor/laminas/laminas-mail/src/Protocol/AbstractProtocol.php:39

This is my configuration in local.config:

'mail' => [
        'transport' => [
            'type' => 'smtp',
            'options' => [
                'name' => 'localhost',
                'host' => 'c1101066.sgvps.net',
                'port' => '465', // 465 for 'ssl', and 587 for 'tls'
                'connection_class' => 'login', // 'plain', 'login', or 'crammd5'
                'connection_config' => [
                    'username' => 'mail@mydomain',
                    'password' => "mypass",
                    'ssl' => 'ssl', // 'ssl' or 'tls'
                    'use_complete_quit' => true,
                ],
            ],
        ],

Is there anything obvious I’m still missing?

Have you tried setting 'name' to your domain? I think that by using 'localhost' the mails created by Omeka will carry @localhost in the From: header which might lead to this issue.

Since this is a shared hosting, I assume that you don’t have access to the full mail logs so you can see which sender address is used?

I do have control over the domain logs. I can ask for them. But anyway, what do you neam with ‘name’? The full domain name?

Yes, try setting it to

'name' => 'boslit.glasgow.ac.uk'

This should “override” the default entry, and I assume that glac.ac.uk is the domain used on your server configuration as default domain.

EDIT: In case you want to send from @glac.ac.uk, then name should be glac.ac.uk as well.

No luck. I tried with both gla.ac.uk and glasgow.ac.uk (they redirect anyway) and boslit.glasgow.ac.uk. Is there a way I can output the full ‘from’ (or, ideally, the whole header) via laminas so that I can see it in the application.log?

PS: I’m sending from mail@boslit.glasgow.ac.uk

Hi @luca.g ,

This post might help: Setting the "From" email address

The default “From” email address is the admin user’s email and this could be your problem.

1 Like

THANK YOU! That did the trick!

1 Like