~sircmpwn/git-send-email.io

4d7bc4f938808f12893911b2a0d002d0590f1086 — Ivan Mironov 3 years ago 23e00d8
Update Gmail-specific instruction

It is not possible to use regular SMTP with login and password for
Google accounts without enabled two-factor authentication[1]. App
passwords page just says "The setting you are looking for is not
available for your account" is such case.

[1] https://support.google.com/accounts/answer/185833
1 files changed, 37 insertions(+), 17 deletions(-)

M index.html
M index.html => index.html +37 -17
@@ 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: