LoginSignup
1
0

More than 3 years have passed since last update.

Mailhogでメール送信テスト環境を作成する。(Windows)

Last updated at Posted at 2021-04-05

Source:
https://github.com/mailhog/MailHog

v1.0.0
https://github.com/mailhog/MailHog/releases/v1.0.0

Windowsは下記いずれかをダウンロードする。
MailHog_windows_386.exe
MailHog_windows_amd64.exe

1.ダウンロードした実行ファイルをどこかに配置する。
2.exeファイルを実行する。
3.Mailhogがウィンドウで表示される。
4.ブラウザでlocalhost:8025にアクセスするとMailhogの画面が表示される。
3.メール送信側で下記を指定する。
-smtpServer:localhost
-port:1025

Powershellで下記を実行したらMailhogでメールが受信されます。

Send-MailMessage -To "to_mail@test.com" -From "from_mail@test.com" -Subject "Test Dayo" -SmtpServer "localhost" -Port 1025

*設定を変更できるとは思いますが、方法が分からないので、ご存知であれば教えていただけると嬉しいです。

参考:
https://kinsta.com/blog/mailhog/

1
0
0

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
1
0