William Posted February 24 Report Posted February 24 (edited) This time I have a more substantial and complicated question. We have set up AWS SES to use as SMTP provider. In the AWS console we have: Verified identities using the same email as the PhPVMS install. Verified Domain. Created SMTP user with credentials. Removed the sandbox and went into production. We went through all the AWS configuration steps properly and sent test emails from within the console successfully. The PhPVMS config states that to use SES, this is what is needed: SES Configuration To use SES, set your .env like: MAIL_MAILER=postmark AWS_ACCESS_KEY_ID='key id' AWS_SECRET_ACCESS_KEY='access key' AWS_DEFAULT_REGION='the region if not us-east-1' (We are currently in region us-east-2) We set it up exactly like the above with our valid & active Access Key & Secret Access Key. When we try to send an email PhPVMS throws a 500 internal error which points to misconfiguration or missing parameters in the .env file The LOG also shows a configuration issue. Are we missing some parameters in the .ENV file that aren't stated in the docs? What am I failing to understand? Thanks in advance as always! Edited February 24 by William Quote
DisposableHero Posted February 24 Report Posted February 24 Hi @William I don't think that `MAIL_MAILER=postmark` is right. Did you tried MAIL_MAILER=ses there by any chance ? Don't forget to clear application cache for .env changes to be applied. Good luck Quote
William Posted February 24 Author Report Posted February 24 Yes, tried SES, but no dice. Somehow, I think the configuration is missing some details. Maybe Nabeel can pitch in when he has a moment..... Quote
DisposableHero Posted February 25 Report Posted February 25 (edited) What is the error after changing mailer to "ses" ? It should be something different compared to using postmark driver. If you've shared your logs with Nabeel it is ok, if not how he can help ? I checked phpvms config for ses, it looks ok though. Edited February 25 by DisposableHero Quote
William Posted March 2 Author Report Posted March 2 (edited) So.... To bring some closure to this topic in case anyone needs it one day, these are the changes we went through to make the mail work: .env file setup as in the picture attached services.php modified as in the picture attached mail.php modified as in the picture attached That makes it work with Amazon SES flawlessly. Thank God for the phpvms community and AI 🙃 Edited March 2 by William Quote
DisposableHero Posted March 3 Report Posted March 3 Hi @William Looks like you added "SES_ENDPOINT" only to services https://github.com/phpvms/phpvms/blob/main/config/services.php#L26-L30 Technically the "MAIL_FROM_ADDRESS" and "MAIL_FROM_NAME" are already defined and can be controlled from .env itself, no need to modify mail.php for them, as it will revert back to defaults during an update. We can add that additional AWS SES Enpoint to phpVMS itself, so future updates will have it and you will not worry about updates Safe flights 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.