Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install it? #13

Open
OnkelTem opened this issue Jun 14, 2016 · 15 comments
Open

How to install it? #13

OnkelTem opened this issue Jun 14, 2016 · 15 comments

Comments

@OnkelTem
Copy link

no clue

@ian-kent
Copy link
Member

ian-kent commented Jul 7, 2016

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

@OlafRadicke
Copy link

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.

@purdy
Copy link

purdy commented Aug 8, 2017

It appears that the code has been updated more recently than the releases. Any chance of getting a new release fileset?

@weseze
Copy link

weseze commented Oct 19, 2018

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.

@adpe
Copy link

adpe commented Jan 4, 2019

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

@gimmesomethinggood
Copy link

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

@darkhan
Copy link

darkhan commented Sep 29, 2020

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

@dirad
Copy link

dirad commented Feb 20, 2021

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

@ibrahim-toure
Copy link

comment installer mailhog et sendmail sur windows
sans oublie la configuration

@Eddcapone
Copy link

Eddcapone commented Sep 3, 2021

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

@brammeleman
Copy link

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.

@frob
Copy link

frob commented Jan 21, 2022

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.

@phoopee3
Copy link

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!

@phoopee3
Copy link

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/

@architchandra
Copy link

My notes:

  • To catch emails on localhost.
    brew install mailhog
  • Follow this guide: MyLocalDev Part 3: MailHog and mhsendmail on OS X - Jon Christopher with the following changes:
    • When installing Go using HomeBrew, change the GOPATH to $HOME/.go. Refer to older .bash_profile file.
    • Install mhsendmail using go install github.com/mailhog/mhsendmail@latest
    • In php.ini, apart from adding the sendmail_path, comment out the SMTP and smtp_port options that are for Win32 only.
  • Then run source ~/.bash_profile and brew services restart httpd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests