Closed eelkeblok closed 9 years ago
It's possible, but sendmail has a lot of command line options - are you just after the basic use-case of piping SMTP content via STDIN?
If it's just that, it should be fairly trivial to implement (ignoring the problem of discovering the running MailHog instance)
Yup, that's it. I have an application that assumes it can use sendmail to send emails. It has you configure a command line that lets it send email contents.
For PHP this would be very useful - otherwise you need to run e.g. sSMTP as well. MailCatcher already does it via its catchmail
command, by the way.
How about this? https://github.com/mailhog/mhsendmail
:smile:
Nice! Will there be a binary distribution of that as well? Could be as part of the MailHog Docker image
LOL, missed the release notes :+1:
Can you explain how i can use mhsendmail from the binary distribution? Like for php's sendmail_path?
Can you explain how i can use mhsendmail from the binary distribution?
You'll need to download the mhsendmail binary from the releases page.
Once you've done that, it should be a simple drop-in replacement for sendmail - although the command line flags will be slightly different. A brief overview is on the mhsendmail readme.
When I get a chance I'll add some info to the MailHog docs and (hopefully) also make it part of the MailHog binary.
Thanks! I somehow missed that the mhsendmail released in a separated binary.
Awesome. Thanks a lot.
I was looking into mailhog, but my application uses sendmail to send its mail. Any chance of adding a drop-in replacement for sendmail that would instead send its messages to mailhog? Or is this already possible and am I missing something (I am aware of the possibility of configuring sendmail to use smtp, but that seems quite involved and ultimately a roundabout way of getting an email from a command line utility into mailhog).