mailhog / mhsendmail

sendmail for MailHog
MIT License
253 stars 60 forks source link

How to install it? #13

Open OnkelTem opened 8 years ago

OnkelTem commented 8 years ago

no clue

ian-kent commented 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

OlafRadicke commented 7 years ago

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 commented 7 years ago

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

weseze commented 6 years ago

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 commented 5 years ago

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 commented 5 years ago
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 commented 4 years ago

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 commented 3 years ago

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 commented 3 years ago

comment installer mailhog et sendmail sur windows sans oublie la configuration

Eddcapone commented 3 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

My notes: