Skip to content

Instantly share code, notes, and snippets.

@relaxdiego
Forked from dayyan/gist:e62bddc65ce1af735f0f
Last active June 12, 2020 09:44
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save relaxdiego/be7b87cae8c2d51d5ee4 to your computer and use it in GitHub Desktop.
Save relaxdiego/be7b87cae8c2d51d5ee4 to your computer and use it in GitHub Desktop.
Setting up git send-email in OS X
  1. Configure Gmail in you gitconfig:
[sendemail]
  smtpserver = smtp.gmail.com
  smtpserverport = 587
  smtpencryption = tls
  smtpuser = <gmail email address>
  from = <email address for From: field>
  1. I recommend setting up an application-specific password in Google dedicated to git.
Account -> Security -> Connected applications and sites : Manage Access
  1. Determine your revlist. To send a single commit, just use the sha. To send a range of commits, you can use start_sha..end_sha. Most likely, you'll want to send the commits made to a branch that are missing in upstream. For that, you would use: upstream/branch_name..branch_name

  2. Send email:

git send-email <revlist> --to <other@user.com>
  1. If you receive an error like this:
Can't locate Net/SMTP/SSL.pm in @INC (@INC contains: ...

You may need to upgrade/install the Net::SMTP::SSL or IO::Socket::SSL packages:

sudo -H cpan -f Net::SMTP::SSL
sudo -H cpan -f IO::Socket::SSL
@kgadek
Copy link

kgadek commented Feb 14, 2016

For me worked by calling cpan -f Net::SMTP::SSL without sudo.

@tmm1
Copy link

tmm1 commented Oct 25, 2017

Did not work without sudo.

@jdek
Copy link

jdek commented Mar 18, 2018

Note that you also need to make sure you use the system cpan (/usr/bin/cpan) when updating/installing Net::SMTP::SSL or IO::Socket::SSL.

@revolter
Copy link

You should not install stuff with sudo, nor install stuff globally. So the correct way is to run

cpan

without any arguments, and answer:

yes
local::lib
yes
yes
exit

Then, open a new terminal window, and run

cpan Net::SMTP::SSL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment