Skip to content
A sendmail to msmtp bridge that works with any php setup for the arguments
Go Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This is a bridge from sendmail to msmtp. The goal is to support all the different ways to provide arguments and translate them to msmtp.

Configuration of "from"

The "from" email can be defined in multiple places. The latest defined will be used.

  • In the /etc/sendmail-to-msmtp.json configuration file
  • In the "-r" argument
  • In the "-f" argument
  • In the "From: " header

Local Usage



The file is then in build/bin/sendmail


To execute: ./build/bin/sendmail

Create release


That will show the latest created version. Then, you can choose one and execute: ./ X.X.X

Use with debian

echo "deb stable main" | sudo tee /etc/apt/sources.list.d/foilen.list
sudo apt-key adv --keyserver hkp:// --recv-keys 379CE192D401AB61
sudo apt update
sudo apt install msmtp sendmail-to-msmtp

Configuration file

If you want to set a default email address for the "from" when no other is specified, you can create the /etc/sendmail-to-msmtp.json configuration file with the following content:

  "defaultFrom" : ""
You can’t perform that action at this time.