Giter VIP home page Giter VIP logo

gosendmail's Introduction

gosendmail

A tiny sendmail replacement for environments with smarthosts, based on mhsendmail

> go get github.com/squash/gosendmail

> gosendmail [email protected] <<EOF
From: App <app@mlocal>
To: Test <test@mlocal>
Subject: Test message

Some content!
EOF

gosendmail looks for default options in /etc/gosendmail.toml. An example is provided.

You can override the from address (for SMTP MAIL FROM):

gosendmail --from="[email protected]" [email protected] ...

Or pass in multiple recipients:

gosendmail --from="admin@ocal" [email protected] [email protected] ...

Or override the destination SMTP server:

gosendmail --smtp-addr="localhost:1026" test@local ...

To use from php.ini

sendmail_path = "/usr/local/bin/gosendmail"

For use in containers

Some container bases will require you to use a statically linked binary, which you can build with:

CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo -ldflags '-w -extldflags "-static"'

Licence

Original Copyright ยฉโ€Ž 2015 - 2016, Ian Kent (http://iankent.uk) (c) 2020 Josh Grebe (https://github.com/squash/)

Released under MIT license, see LICENSE for details.

gosendmail's People

Contributors

squash avatar brokedown avatar

Stargazers

Torsten Curdt avatar

Watchers

 avatar James Cloos avatar

Forkers

zerowebcorp

gosendmail's Issues

Problem working with Apache/PHP

Hello

I've installed gosendmail on /usr/sbin/gosendmail. I've updated my php.ini and replaced sendmail_path with /usr/sbin/gosendmail

Then created a test php file with one line of code to send an email.

It works fine when I test it using command line
php mail.php

However, if I am opening the file using a browser, the mails are not being sent. http://localhost/mail.php

What could be the problem here ? Could you please help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.