omrakhur omrakhur - 2 months ago 10
PHP Question

where to insert SES key, secret, SMTP username, SMTP password in .env file for laravel 5?

I've followed advice here and here, but I cannot understand where to put the following four things in my

config/mail.php
and
config/services.php
files
I am using SMTP, not the API to send mail in my laravel app.

What I don't understand now:
Do I need to use only
MAIL_USERNAME
,
MAIL_PASSWORD
, or do I need to use the
SES_SECRET
,
SES_KEY
as well? From SES, I downloaded a file with my smtp username, smtp password. I guess they are to be plugged into the
MAIL_USERNAME
and
MAIL_PASSWORD
fields. But then where do I get the key and secret from? I know my region, but can't understand where to get the secret and key from. There's a key available for the SES user inside IAM, but it has no secret there. Just a key.

Do I need to use the AWS secret and key? This is really confusing, please help.

Answer

Yes, you need to use the secret and key. Look at this link to see how to obtain these settings. If you've already done this and can't physically view the data anymore you'll probably need to delete the old key and regenerate a new one so you can see it.

You may need to supply MAIL_USERNAME. I'm not 100% on needing MAIL_PASSWORD, probably not though.

Comments