#MailHog example page **MailHog** is an email testing tool for developers. It gives the developer the option to **intercept** and **inspect** the emails sent by his application. You can download the MailHog Windows client from one of the links below. - [Windows(x64) client](https://github.com/mailhog/MailHog/releases/download/v0.2.1/MailHog_windows_amd64.exe) - [Windows(x86) client](https://github.com/mailhog/MailHog/releases/download/v0.2.1/MailHog_windows_386.exe) The only configurations necessary for Apache are located into the **php.ini** Put the downloaded file into, for example: `C:/xampp/sendmail/mailhog.exe` Then open the **php.ini** and change the lines like below: - smtp_port = 1025 - sendmail_path = "C:/xampp/sendmail/mailhog.exe sendmail" After changing the configurations in **php.ini** remmember to **restart apache**. Then run **mailhog.exe** and visit [http://localhost:8025/](http://localhost:8025/) in your browser! Every email sent by localhost will now be redirected to **MailHog** and you can inspect it in [http://localhost:8025/](http://localhost:8025/) For more information and support visit the [MailhHog GitHub](https://github.com/mailhog/MailHog) page. Mail php script for testing MailHog. ------------------------- You can test if the above is working by putting the following code into a .php file and open it in localhost (after mailhog configuration). ```php MailHog email example '.$_POST["mail"].' '; $body .= chunk_split( base64_encode( $message ) ); $body .= "--$boundary"; $headers = 'From: <'.$from.'>'.PHP_EOL; $headers.= 'Reply-To: <'.$from.'>'.PHP_EOL; $headers.= 'CC: '.$from.''.PHP_EOL; $headers.= 'MIME-Version: 1.0'.PHP_EOL; $headers.= 'Content-Type: multipart/alternative;boundary="'.$boundary.'"'.PHP_EOL; if(mail($to, '=?utf-8?B?'.base64_encode($subject).'?=', $body, $headers)){ $data["success"] = true; $data["text"] = "Mail was sent successfully."; }else{ $data["success"] = false; $data["text"] = "Mail was not sent."; } echo json_encode($data); }else{ ?> MailHog email example

Send an email for MailHog to Catch it.

" method="post">
```