Skip to content

Commit 95ce81f

Browse files
AdityaGarg8gitster
authored andcommitted
docs: add a paragraph explaining the sendmailCmd option of sendemail
`sendmailCmd` is a configuration option in `git-send-email` that allows users to send emails using an external application that supports sendmail-like commands. This ability has been very useful to support proprietary email APIs without modifying the `git-send-email` codebase. It is also useful for users who prefer to use another SMTP client instead of the SMTP perl library used by `git-send-email`. This commit adds a paragraph to the documentation explaining this option. Signed-off-by: Aditya Garg <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 18617b2 commit 95ce81f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Documentation/git-send-email.adoc

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,35 @@ These additional Perl modules are also required:
619619
https://metacpan.org/pod/Authen::SASL[Authen::SASL] and
620620
https://metacpan.org/pod/Mail::Address[Mail::Address].
621621

622+
Exploiting the `sendmailCmd` option of `git send-email`
623+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
624+
625+
Apart from sending emails via an SMTP server, `git send-email` can also send
626+
emails through any application that supports sendmail-like commands. You can
627+
read documentation of `--sendmail-cmd=<command>` above for more information.
628+
This ability can be very useful if you want to use another application as an
629+
SMTP client for `git send-email`, or if your email provider uses proprietary
630+
APIs instead of SMTP to send emails.
631+
632+
As an example, lets see how to configure https://marlam.de/msmtp/[msmtp], a
633+
popular SMTP client found in many Linux distributions. Edit `~/.gitconfig`
634+
to instruct `git-send-email` to use it for sending emails.
635+
636+
----
637+
[sendemail]
638+
sendmailCmd = /usr/bin/msmtp # Change this to the path where msmtp is installed
639+
----
640+
641+
Links of a few such community maintained helpers are:
642+
643+
- https://marlam.de/msmtp/[msmtp]
644+
(popular SMTP client with many features, available for Linux and macOS)
645+
646+
- https://github.com/AdityaGarg8/git-credential-email[git-protonmail]
647+
(cross platform client that can send emails using the ProtonMail API)
648+
649+
- https://github.com/AdityaGarg8/git-credential-email[git-msgraph]
650+
(cross platform client that can send emails using the Microsoft Graph API)
622651

623652
SEE ALSO
624653
--------

0 commit comments

Comments
 (0)