![]() ![]() Remove the semi-colon and set its value to mhsendmail: sendmail_path = /usr/local/bin/mhsendmail If you have never modified it, it will look like this: sendmail_path = Next, let’s connect PHP to MailHog at both web server and CLI’s php.ini files. ![]() For example, I use Ubuntu 16.04, so I used these commands: ~]$ wget ~]$ sudo chmod +x ~]$ sudo mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail Then make it available in your system path. Start by opening the mhsendmail’s releases page and download the one for your system. To send outgoing email from PHP to MailHog, we need to download mhsendmail and then reference it at php.ini. ![]() Connecting PHP’s email with MailHog through mhsendmail In the next section, we will install mhsendmail, so PHP sends outgoing email to MailHog. Not setting the loopback IP address to the container would mean that anyone connected to the same network could access MailHog’s resources. ![]() The -publish flag maps the container's internal IP address to 127.0.0.1 on the host machine. MailHog by default listens on 0.0.0.0, which means whatever internal IP address is assigned to the Docker container. Now let’s look at its log to verify that it started correctly: ~]$ docker logs mailhogĦ 21:20:08 Binding to address: 0.0.0.0:1025Ĭheck out the above output: MailHog’s web interface is running at 0.0.0.0:8025. The above command will print the container identifier and then exit because we requested Docker to run the container in the background.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |