# [PATCH] docs: update sendmail docs to use more secure SMTP server for Gmail

4 messages from 2025-08-25 to 2025-08-26. Participants: Aditya Garg, Junio C Hamano.
Thread: https://gitlist.dev/t/64028

## Aditya Garg, 2025-08-25 06:55

Subject: [PATCH] docs: update sendmail docs to use more secure SMTP server for Gmail
Message-ID: <PN3PR01MB95973B72C16F68D63BE2B410B83EA@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>
URL: https://gitlist.dev/e/PN3PR01MB95973B72C16F68D63BE2B410B83EA%40PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM

```
Gmail's SMTP server also has a port 465 with SSL/TLS encryption. It is
more secure than port 587 with STARTTLS encryption. Update the docs to
reflect this change.

Signed-off-by: Aditya Garg <gargaditya08@live.com>
---
 Documentation/git-send-email.adoc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/git-send-email.adoc b/Documentation/git-send-email.adoc
index 5335502d68..c610909a92 100644
--- a/Documentation/git-send-email.adoc
+++ b/Documentation/git-send-email.adoc
@@ -521,10 +521,10 @@ edit `~/.gitconfig` to specify your account settings:
 
 ----
 [sendemail]
-	smtpEncryption = tls
+	smtpEncryption = ssl
 	smtpServer = smtp.gmail.com
 	smtpUser = yourname@gmail.com
-	smtpServerPort = 587
+	smtpServerPort = 465
 ----
 
 Gmail does not allow using your regular password for `git send-email`.
@@ -542,10 +542,10 @@ if you want to use `OAUTHBEARER`, edit your `~/.gitconfig` file and add
 
 ----
 [sendemail]
-	smtpEncryption = tls
+	smtpEncryption = ssl
 	smtpServer = smtp.gmail.com
 	smtpUser = yourname@gmail.com
-	smtpServerPort = 587
+	smtpServerPort = 465
 	smtpAuth = OAUTHBEARER
 ----
 
-- 
2.51.0


```

## Junio C Hamano, 2025-08-26 14:51

Subject: Re: [PATCH] docs: update sendmail docs to use more secure SMTP server for Gmail
Message-ID: <xmqqcy8im8zd.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqcy8im8zd.fsf%40gitster.g
In-Reply-To: <PN3PR01MB95973B72C16F68D63BE2B410B83EA@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>

```
Aditya Garg <gargaditya08@live.com> writes:

> Gmail's SMTP server also has a port 465 with SSL/TLS encryption. It is
> more secure than port 587 with STARTTLS encryption. Update the docs to
> reflect this change.

"Update the docs to reflect this change"?  When there is no change
other than the changes this patch is making to the documentation,
that is a very strange thing to say.

I would have explained it this way instead, perhaps.

    Earlier recommendation by IETF with RFC 2595 was to deprecate
    implicit TLS in preference for upgrade an initially unencrypted
    connection with STARTTLS command.  These days, however, IETF
    recommends that connections be made using "Implicit TLS", in
    preference to STARTTLS and the like, completely reversing their
    earlier position, in RFC8314.

    Update the GMail example to use the implicit TLS to match the
    current recommendation at port 465.




> Signed-off-by: Aditya Garg <gargaditya08@live.com>
> ---
>  Documentation/git-send-email.adoc | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/git-send-email.adoc b/Documentation/git-send-email.adoc
> index 5335502d68..c610909a92 100644
> --- a/Documentation/git-send-email.adoc
> +++ b/Documentation/git-send-email.adoc
> @@ -521,10 +521,10 @@ edit `~/.gitconfig` to specify your account settings:
>  
>  ----
>  [sendemail]
> -	smtpEncryption = tls
> +	smtpEncryption = ssl
>  	smtpServer = smtp.gmail.com
>  	smtpUser = yourname@gmail.com
> -	smtpServerPort = 587
> +	smtpServerPort = 465
>  ----
>  
>  Gmail does not allow using your regular password for `git send-email`.
> @@ -542,10 +542,10 @@ if you want to use `OAUTHBEARER`, edit your `~/.gitconfig` file and add
>  
>  ----
>  [sendemail]
> -	smtpEncryption = tls
> +	smtpEncryption = ssl
>  	smtpServer = smtp.gmail.com
>  	smtpUser = yourname@gmail.com
> -	smtpServerPort = 587
> +	smtpServerPort = 465
>  	smtpAuth = OAUTHBEARER
>  ----

```

## Aditya Garg, 2025-08-26 15:07

Subject: Re: [PATCH] docs: update sendmail docs to use more secure SMTP server for Gmail
Message-ID: <PN3PR01MB959704D84DCD379442A9D053B839A@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>
URL: https://gitlist.dev/e/PN3PR01MB959704D84DCD379442A9D053B839A%40PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM
In-Reply-To: <xmqqcy8im8zd.fsf@gitster.g>

```


On 26/08/25 8:21 pm, Junio C Hamano wrote:
>     Earlier recommendation by IETF with RFC 2595 was to deprecate
>     implicit TLS in preference for upgrade an initially unencrypted
>     connection with STARTTLS command.  These days, however, IETF
>     recommends that connections be made using "Implicit TLS", in
>     preference to STARTTLS and the like, completely reversing their
>     earlier position, in RFC8314.
> 
>     Update the GMail example to use the implicit TLS to match the
>     current recommendation at port 465.

Fixed in v2


```

## Aditya Garg, 2025-08-26 15:09

Subject: [PATCH v2] docs: update sendmail docs to use more secure SMTP server for Gmail
Message-ID: <20250826150919.5239-1-gargaditya08@live.com>
URL: https://gitlist.dev/e/20250826150919.5239-1-gargaditya08%40live.com
In-Reply-To: <PN3PR01MB95973B72C16F68D63BE2B410B83EA@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>

```
Earlier recommendation by IETF with RFC 2595 was to deprecate
implicit TLS in preference for upgrade an initially unencrypted
connection with STARTTLS command.  These days, however, IETF
recommends that connections be made using "Implicit TLS", in
preference to STARTTLS and the like, completely reversing their
earlier position, in RFC8314.

Update the GMail example to use the implicit TLS to match the
current recommendation at port 465.

Signed-off-by: Aditya Garg <gargaditya08@live.com>
---
 Documentation/git-send-email.adoc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/git-send-email.adoc b/Documentation/git-send-email.adoc
index daddaae36d..8aa54e36e7 100644
--- a/Documentation/git-send-email.adoc
+++ b/Documentation/git-send-email.adoc
@@ -565,10 +565,10 @@ edit `~/.gitconfig` to specify your account settings:
 
 ----
 [sendemail]
-	smtpEncryption = tls
+	smtpEncryption = ssl
 	smtpServer = smtp.gmail.com
 	smtpUser = yourname@gmail.com
-	smtpServerPort = 587
+	smtpServerPort = 465
 ----
 
 Gmail does not allow using your regular password for `git send-email`.
@@ -586,10 +586,10 @@ if you want to use `OAUTHBEARER`, edit your `~/.gitconfig` file and add
 
 ----
 [sendemail]
-	smtpEncryption = tls
+	smtpEncryption = ssl
 	smtpServer = smtp.gmail.com
 	smtpUser = yourname@gmail.com
-	smtpServerPort = 587
+	smtpServerPort = 465
 	smtpAuth = OAUTHBEARER
 ----
 

Range-diff against v1:
-:  ---------- > 1:  6b73d4bb6c docs: update sendmail docs to use more secure SMTP server for Gmail
-- 
2.51.0


```
