Help us understand the problem. What is going on with this article?

MailHogでテスト用メールサーバーを立てる

image.png

docker-compose.yml
version: "3"
services:
  mail:
    image: mailhog/mailhog:latest
    ports:
      - "8025:8025"
      - "1025:1025"
  • 上記docker-compose.ymlを作成して起動するだけ。
$ vi docker-compose.yml
$ docker-compose up
Recreating mail_mail_1_39afdc4c7660 ... done
Attaching to mail_mail_1_39afdc4c7660
mail_1_39afdc4c7660 | [HTTP] Binding to address: 0.0.0.0:8025
mail_1_39afdc4c7660 | Creating API v1 with WebPath:
mail_1_39afdc4c7660 | Creating API v2 with WebPath:
mail_1_39afdc4c7660 | 2019/01/23 14:58:28 Using in-memory storage
mail_1_39afdc4c7660 | 2019/01/23 14:58:28 [SMTP] Binding to address: 0.0.0.0:1025
mail_1_39afdc4c7660 | 2019/01/23 14:58:28 Serving under http://0.0.0.0:8025/
  • あとはメールを投げればUIから確認可能
$ echo "test" | mail -s "title" -S "smtp=smtp://localhost:1025" -r from@example.com to@example.com

参考

mailhog/MailHog: Web and API based SMTP testing

mailhog/mailhog - Docker Hub

雑に用意するWindowsでのDockerを利用したLaravel開発環境 - Qiita

LaravelでMailHogを導入して快適にメール開発をしよう!【Docker】 | WINDII

ローカルでのテストに使えるメールサーバー、MailHogを試す - CLOVER🍀

mailコマンドでSMTPサーバを指定してメール送信する方法 | ぴぐろぐ

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away