I want to simulate email send/receive on a Laravel 8.x app, something like using Insomnia or Postman to test REST feature by sending to an endpoint. What I want to do is to send the email to the app, and debug the app processing the email it received, all of them running on a local VM (CentOS 8), without having to send emails using my actual account.
Not much info in the Internet, and results are usually for sending out from Laravel app. Could it be that my scenario is not possible?
2
Answers
if I got your requirements correctly, you could use a mail server like Mailu
I hope this help.
Not sure if I understand, but you can use Mailhog which is an email-testing tool with a fake SMTP server underneath. MailHog runs a super simple SMTP server that hogs outgoing emails sent to it.
All outgoing emails will be trapped by MailHog, being pretty useful in order to avoid sending emails accidentally when developing.
I’ve asked (and finally found a solution) in this question:
Auto boot MailHog on Ubuntu 20.04 about how to use it in a staging evironment, but running locally with no need to auto start the service is even easier.
There are tons of tutorials about how to implement MailHog and Laravel.