Configuring sendmail or SMTP for Omeka S on Amazon Lightsail

Hello everyone,

I’m new here and have recently integrated Omeka S into our institution using an Amazon Lightsail LAMP instance. While I’ve had success with the installation, I’ve faced challenges setting up the Guest and Guest API modules due to its need for outbound email sending configurations for new user email confirmations. Despite attempts with sendmail and manual SMTP configurations in local.config.php, I haven’t been successful. Though, with sendmail installed, the website indicates the email was sent, I never receive it. I’m aware that Amazon restricts port 25 on their EC2 instances. Does anyone have a solution or workaround for this issue?

Thank you!

I am now trying connecting SMTP with Amazon SES service.

This is my current local.config.php settings:

    'mail' => [
        'transport' => [
            'type' => 'smtp',
            'options' => [
                'name' => '????', // What should go here?
                'host' => '',
                'port' => 587,
                'connection_class' => 'smtp',
                'connection_config' => [
                    'username' => 'AKIA6O...7Y3',
                    'password' => 'BB3cHp...M8yA',
                    'ssl' => 'tls', 
                    'use_complete_quit' => true,

Am I doing it right? And, what should go to ‘name’?

I’m not familiar specifically with Lightsail but I assume it’s not really different…

Personally the way I’ve always done this is with Postfix: you can set it to relay all mail through SES, and then on the Omeka side you don’t need any configuration. I believe Amazon used to have documentation pages for how to set up Postfix with SES, but it seems like they might have been removed at some point.

An SMTP connection configured directly through Omeka should work as well, though. The only thing I see obviously wrong there is connection_class: it should be plain and not smtp.

The name key you asked about is what your server will call itself when connecting to the Amazon mail server. If you leave that key out completely it will just use localhost as the name. I don’t think SES really cares about what you put there.

Do note that Amazon SES requires you to authorize addresses or domains that you’re going to use as the “From:” header in emails you send, so you have to make sure you’ve done that for the address you’re sending Omeka mail as (typically that’s the “Administrator email” global setting that controls the From address).

If things still aren’t working, you’d probably need to provide more detail about what happens when you try to send, what error message is returned, etc.

1 Like

Thank you very much! You’ve been a lifesaver! :slight_smile:

I’ve updated the admin email in the verified identities area of Amazon SES and corrected the connection_class value. Everything’s running seamlessly now!

I sincerely appreciate your assistance.