Open OnkelTem opened 8 years ago
It probably needs some more documentation, but mhsendmail should be installed in the same way as MailHog, e.g. using the binary release from the releases page, or by using go get github.com/mailhog/mhsendmail
if you have go installed
I think it's a good idea to follow this Rules http://githubengineering.com/scripts-to-rule-them-all/ So it's easier to use this project for others.
It appears that the code has been updated more recently than the releases. Any chance of getting a new release fileset?
This is still really unclear/difficult for someone who is not experienced in doing things like this. (like me)
Installing it the same way as mailhog: brew install mhsendmail: didn't work, doesn't exist... Installing it with go: nothing happend, binary is not available, not found in command line... Downloading the binary file from the releases: great, but ... which one do I need, where do I place it? Follow the rules at: http://githubengineering.com/scripts-to-rule-them-all/: Didn't even bother with this option, just looks like complete alien language to me... :)
Should really be made much easier and documented better.
Here's an example https://gist.github.com/shakhmehedi/bbeb643079171be322eb6e9d08c7c020
On a CentOS env. install it with:
yum install go
go get github.com/mailhog/mhsendmail
ln ~/go/bin/mhsendmail /usr/bin/mhsendmail
mhsendmail -h
HTH Adrian
yum install go go get github.com/mailhog/mhsendmail ln ~/go/bin/mhsendmail /usr/bin/mhsendmail mhsendmail -h
I had to add a hyphen s
to the ln command:
sudo ln -s ~/go/bin/mhsendmail /usr/bin/mhsendmail
How to install it on Mac OS X? Installing Mailhog is okay via brew
Dark.local ➜ ~ go get github.com/mailhog/mhsendmail
fatal: not a git repository (or any of the parent directories): .git
not a Go user:
Installing MailHog was fine, but here go get github.com/mailhog/mhsendmail
returns with nothing, and I dont have mhsendmail in /usr/bin
or /usr/local/bin
comment installer mailhog et sendmail sur windows sans oublie la configuration
Ubuntu:
sudo apt-get -y install golang-go
go get github.com/mailhog/MailHog
ln ~/go/bin/mhsendmail /usr/bin/mhsendmail
If you get ln: failed to access '/home/magento_user/go/bin/mhsendmail': No such file or directory
then try:
ln ~/go/bin/MailHog /usr/bin/MailHog
Test:
mhsendmail -h
Use this to install the current HEAD state of this repository:
go install github.com/mailhog/mhsendmail@9e70164f299c9e06af61402e636f5bbdf03e7dbb
It includes the fix for the environment variables #25
Use this snippet to include the latest mhsendmail in your container:
FROM golang:latest AS builder
WORKDIR /go/src
RUN go install github.com/mailhog/mhsendmail@9e70164f299c9e06af61402e636f5bbdf03e7dbb
then, later on:
COPY --from=builder /go/bin/mhsendmail /usr/bin/sendmail
For me, this was the missing documentation to get mhsendmail
working as a sendmail
drop-in replacement.
With most of the comments from the last two years in this 5+ year old issue I wonder if it would be better to use something else.
For me, I have to type in
$ go install github.com/mailhog/mhsendmail@latest
And then get this output
go: finding module for package github.com/ogier/pflag
go: found github.com/ogier/pflag in github.com/ogier/pflag v0.0.1
But... it doesn't seem to put it anywhere on my system, so I'm at a loss of what to do. Any help would be appreciated!
OK I got it, and maybe this will help other people. It doesn't put it in a /go/
folder, it creates a go
folder in your user folder. So I had to modify the php.ini file on my local setup to use that path:
sendmail_path = "/Users/phoopee3/go/bin/mhsendmail"
This article helped me figure it out: https://jonchristopher.us/blog/mylocaldev-part-3-mailhog-mhsendmail-os-x/
My notes:
brew install mailhog
GOPATH
to $HOME/.go
. Refer to older .bash_profile
file.mhsendmail
using go install github.com/mailhog/mhsendmail@latest
php.ini
, apart from adding the sendmail_path, comment out the SMTP
and smtp_port
options that are for Win32 only.source ~/.bash_profile
and brew services restart httpd
no clue