@@ 38,23 38,43 @@
<label for="mailer-gmail">Gmail</label>
<div class="content">
<p>
- Add these details to your global configuration file:
- </p>
- <pre>[sendemail]
- smtpserver = smtp.gmail.com
- smtpuser = you@gmail.com
- smtpencryption = tls
- smtpserverport = 587</pre>
- <p>
- Be sure to fill in your own email address under
- <code>smtpuser</code>. You also need to obtain an
- application-specific password for git from the <a
- href="https://security.google.com/settings/security/apppasswords"
- target="_blank"
- >app passwords</a> page on your Google account. To store this
- password with git, run this command:
- </p>
- <pre>git config --global sendemail.smtpPass 'your password'</pre>
+ There are two possible ways of using Gmail with
+ <code>git send-email</code>:
+ </p>
+ <ol>
+ <li>
+ First, make sure that <a
+ href="https://support.google.com/accounts/answer/185839"
+ target="_blank"
+ >two-factor authentication</a> is enabled for your Google
+ account. Then, obtain an application-specific password
+ for git from the <a
+ href="https://security.google.com/settings/security/apppasswords"
+ target="_blank"
+ >app passwords</a> page. To store this password with git,
+ run this command:
+ <pre>git config --global sendemail.smtpPass 'your password'</pre>
+ Next step is to add these details to your global
+ configuration file:
+ <pre>[sendemail]
+ smtpserver = smtp.gmail.com
+ smtpuser = you@gmail.com
+ smtpencryption = tls
+ smtpserverport = 587</pre>
+ Be sure to fill in your own email address under
+ <code>smtpuser</code>.
+ </li>
+ <li>
+ It is still possible to use <code>git send-email</code>
+ without two-factor authentication and application-specific
+ password, but this requires installation and configuration
+ of <a
+ href="https://github.com/google/gmail-oauth2-tools/tree/master/go/sendgmail"
+ target="_blank"
+ >the special tool</a>, which mimics regular
+ <code>sendmail</code>.
+ </li>
+ </ol>
<p>
Also, if you haven't yet, run these
commands - again, making the appropriate changes: