Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amazon SES data is not set correctly in .env and also not used correctly in config/services.php #10983

Closed
2 tasks done
chrisweirich opened this issue Apr 27, 2022 · 5 comments
Closed
2 tasks done

Comments

@chrisweirich
Copy link
Contributor

chrisweirich commented Apr 27, 2022

Debug mode

Describe the bug

If the Amazon SES driver is used for sending mails, not all data can be stored in .env or are not accepted correctly in config/services.php.

.env

# --------------------------------------------
# REQUIRED: OUTGOING MAIL SERVER SETTINGS
# --------------------------------------------
MAIL_DRIVER=ses
MAIL_HOST=email-smtp.us-west-2.amazonaws.com
MAIL_PORT=587
MAIL_USERNAME=YOURUSERNAME
MAIL_PASSWORD=YOURPASSWORD
MAIL_ENCRYPTION=null
[email protected]
MAIL_FROM_NAME='Snipe-IT'
[email protected]
MAIL_REPLYTO_NAME='Snipe-IT'
MAIL_AUTO_EMBED_METHOD='attachment'

config/services.php

    'ses' => [
        'key'    => env('SES_KEY'),
        'secret' => env('SES_SECRET'),
        'region' => 'us-east-1',
    ],

Reproduction steps

  1. Change driver to 'ses'

Expected behavior

Amazon SES should work

Snipe-IT Version

v6.0.0-RC-7

Operating System

Debian

Web Server

nginx

PHP Version

8.0.18

@welcome
Copy link

welcome bot commented Apr 27, 2022

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@chrisweirich
Copy link
Contributor Author

I've created a pull request to solve this problem: https://github.com/snipe/snipe-it/pull/10982

@snipe
Copy link
Owner

snipe commented Apr 27, 2022

We use SES on the hosted platform, so it does work, just not the way later versions of Laravel expect it to work

@chrisweirich
Copy link
Contributor Author

chrisweirich commented Apr 28, 2022

If I see it correctly, Laravel 8 is used after all. In this there is the following instruction: https://laravel.com/docs/8.x/mail#ses-driver

In this guide you can choose the region, otherwise the IAM user would have to be created in us-east-1. But in the current config you can not overwrite the region.

I understand that in Laravel 6 it was implemented in a different way, but I assumed that SnipeIT v6 would go back to the default of Laravel. If that is not the case, feel free to consider this issue resolved.

Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.

snipe added a commit that referenced this issue Apr 28, 2022
Fixed #10983: Possibility to set region for AWS (SES)
@chrisweirich
Copy link
Contributor Author

Thank you for merging my PR #10982

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants