Local 5.6.8 MailHog Not Catching Mail Windows

MailHog was not intercepting e-mail on Windows again.

To work around this issue, open your site’s conf/php/php.ini.hbs file:

CHANGE (line 30)
sendmail_path = “’{{mail.mailhogPath}}’ sendmail --smtp-addr={{mail.mailhogSmtpAddr}} mailhog@flywheel.local”

TO
sendmail_path = ‘"{{mail.mailhogPath}}" sendmail --smtp-addr={{mail.mailhogSmtpAddr}} mailhog@flywheel.local’

RESTART SITE

Hope this helps someone else.

1 Like

Hey @endurtech – thanks for the tip!

To help zero in on this issue:

  • Are you seeing this for all new sites in Local, or only existing ones?
  • What kind of environment is this for? For example, php 7.4.1 and Nginx, or something else?
  • What version of Windows is installed?

Hey @ben.turner - I too faced this issue but the solution by @endurtech did solve the problem.

Thanks @endurtech.

Now regarding the questions you asked:

  • Are you seeing this for all new sites in Local, or only existing ones?

I found this issue for the existing ones.

  • What kind of environment is this for? For example, php 7.4.1 and Nginx, or something else?

Environment was PHP 7.3.5, Nginx

  • What version of Windows is installed?

I am on the latest version of LocalWP.

I hope this helps in someway :slight_smile:

Thanks,
Dhruvin

1 Like

Same issue Mailhog does not catch messages from Contact Form 7
Local is Windows 10, last version of Local, Web server Nginx PHP 7.3.5 Wordpress 5.5.1
Tried the fix in conf/php/php.ini.hbs file but it not worked for me made a critical error in WP.

I enclose some log below:

Blockquote
{“thread”:“main”,“class”:“Process”,“process”:“mailhog”,“pid”:5872,“level”:“info”,“message”:“Killing process”,“timestamp”:“2020-09-09T10:12:25.130Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“pid”:3244,“level”:“info”,“message”:“Killing process”,“timestamp”:“2020-09-09T10:12:25.146Z”}
{“thread”:“main”,“class”:“Process”,“process”:“nginx”,“pid”:9568,“level”:“info”,“message”:“Killing process”,“timestamp”:“2020-09-09T10:12:25.163Z”}
{“thread”:“main”,“class”:“Process”,“process”:“phpCgi”,“pid”:6704,“level”:“info”,“message”:“Killing process”,“timestamp”:“2020-09-09T10:12:25.178Z”}
{“thread”:“main”,“class”:“Process”,“process”:“phpCgi”,“pid”:4956,“level”:“info”,“message”:“Killing process”,“timestamp”:“2020-09-09T10:12:25.194Z”}
{“thread”:“main”,“class”:“”,“message”:“Compiling service configs…”,“level”:“info”,“timestamp”:“2020-09-09T10:12:27.053Z”}
{“thread”:“main”,“class”:“Process”,“process”:“nginx”,“pid”:2764,“level”:“info”,“message”:“Killing process”,“timestamp”:“2020-09-09T10:12:27.573Z”}
{“thread”:“main”,“reason”:{},“p”:{},“level”:“warn”,“message”:“Unhandled Rejection.”,“timestamp”:“2020-09-09T10:12:32.420Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2020-09-09T10:12:27.556123Z 0 [System] [MY-010116] [Server] %%resourcesPath%%\lightning-services\mysql-8.0.16+5\bin\win64\bin\mysqld.exe (mysqld 8.0.16) starting as process 1176”,“timestamp”:“2020-09-09T10:12:35.443Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2020-09-09T10:12:27.559492Z 0 [Warning] [MY-013243] [Server] --character-set-server: The character set UTF8MB3 is deprecated and will be removed in a future release. Please consider using UTF8MB4 instead.”,“timestamp”:“2020-09-09T10:12:35.444Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2020-09-09T10:12:33.795385Z 0 [System] [MY-010229] [Server] Starting crash recovery…”,“timestamp”:“2020-09-09T10:12:35.444Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2020-09-09T10:12:33.803915Z 0 [System] [MY-010232] [Server] Crash recovery finished.”,“timestamp”:“2020-09-09T10:12:35.444Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2020-09-09T10:12:35.336468Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.”,“timestamp”:“2020-09-09T10:12:35.445Z”}
{“thread”:“main”,“class”:“Process”,“process”:“mysql”,“level”:“warn”,“message”:“2020-09-09T10:12:35.443799Z 0 [System] [MY-010931] [Server] %%resourcesPath%%\lightning-services\mysql-8.0.16+5\bin\win64\bin\mysqld.exe: ready for connections. Version: ‘8.0.16’ socket: ‘’ port: 10002 MySQL Community Server - GPL.”,“timestamp”:“2020-09-09T10:12:35.446Z”}
{“thread”:“main”,“class”:“Process”,“process”:“phpCgi”,“level”:“warn”,“message”:“The filename, directory name, or volume label syntax is incorrect.”,“timestamp”:“2020-09-09T10:15:47.253Z”}
{“thread”:“main”,“class”:“Process”,“process”:“phpCgi”,“level”:“warn”,“message”:“The filename, directory name, or volume label syntax is incorrect.”,“timestamp”:“2020-09-09T10:15:47.294Z”}
{“thread”:“main”,“class”:“Process”,“process”:“phpCgi”,“level”:“warn”,“message”:“The filename, directory name, or volume label syntax is incorrect.”,“timestamp”:“2020-09-09T10:19:28.905Z”}
{“thread”:“main”,“class”:“Process”,“process”:“phpCgi”,“level”:“warn”,“message”:“The filename, directory name, or volume label syntax is incorrect.”,“timestamp”:“2020-09-09T10:19:28.929Z”}

Blockquote

Maybe you simply copied and pasted the supplied code into the file?

For the provided solution, try manually inserting/replacing the quotes ( " ) ( ’ )

Hope this helps.

Still not working. Thanks

; Sendmail
sendmail_path = ‘“{{mail.mailhogPath}}” sendmail --smtp-addr={{mail.mailhogSmtpAddr}} mailhog@flywheel.local’

Hey @ignasitort

I’m having trouble recreating this on my Windows 10 test machine using Local 5.7.4. The way that I’m testing is creating a new, plain WordPress site and then trying to reset my user password using the “forgot password” screen of the WordPress admin.

When you are testing on the latest version of Local are you creating a new site and then trying to send those emails?

If you have an existing site, can you try exporting it and re-importing it to a new site in Local?

One thing to verify – is this only happening with Contact Form 7? Is Mailhog able to capture the password reset emails from WordPress?

Well, I checked a second Test website in Local and Mailhog works recovering emails!
So it seems its an issue related to this environment only.
I will next try to export and Import the Development website I am trying to test. See if it works.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.