LoginSignup
0
0

More than 3 years have passed since last update.

Laravel + DockerでMailHogの使用

Posted at

Laravelを用いてメール送信の確認をしたいとき、homesteadに同梱されているMailHogを使用して確認したいとき
ドキュメント:https://readouble.com/laravel/6.x/ja/homestead.html
参考:https://qiita.com/munimuni/items/b902f2c3ec643ed78e4a

laravelプロジェクト内の .envを編集

/laravelプロジェクト/.env
MAIL_DRIVER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=root  # 任意
MAIL_PASSWORD=root  # 任意
MAIL_ENCRYPTION=null

MailHogをローカルで起動
docker-compose up -d mailhog
起動後、ポート番号8025でMailHogを開き、laravelからテスト実行

0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0