Gmail does not work with Gitea #4055

Closed
opened 2025-11-02 05:35:51 -06:00 by GiteaMirror · 14 comments
Owner

Originally created by @jayjupdhig on GitHub (Oct 3, 2019).

Do i need to set a special setting? (SSL, TLS, whtever..) ?

What is the default for mail servers?

That does not work:

ENABLED = true
HOST    = smtp.gmail.com
FROM    = xxx@gmail.com
USER    = xxx@gmail.com
PASSWD  = ......

Why? Thank you for your feedbacks.

Regards, Jan

Originally created by @jayjupdhig on GitHub (Oct 3, 2019). Do i need to set a special setting? (SSL, TLS, whtever..) ? What is the default for mail servers? That does not work: ``` ENABLED = true HOST = smtp.gmail.com FROM = xxx@gmail.com USER = xxx@gmail.com PASSWD = ...... ``` Why? Thank you for your feedbacks. Regards, Jan
GiteaMirror added the type/question label 2025-11-02 05:35:51 -06:00
Author
Owner

@homburgs commented on GitHub (Oct 3, 2019):

image

@homburgs commented on GitHub (Oct 3, 2019): ![image](https://user-images.githubusercontent.com/2833290/66130517-1ba2a100-e5f2-11e9-8783-df13f8e0ad76.png)
Author
Owner

@jayjupdhig commented on GitHub (Oct 3, 2019):

Thank you very much!

I know that, but what i need to configure here?

ENABLED = true
HOST    = smtp.gmail.com
FROM    = xxx@gmail.com
USER    = xxx@gmail.com
PASSWD  = ......

if the default setting for gitea mailing unencrypted, so i need to add some parameters? (What are the default connection options?)

Regards, Jan

@jayjupdhig commented on GitHub (Oct 3, 2019): Thank you very much! I know that, but what i need to configure here? ``` ENABLED = true HOST = smtp.gmail.com FROM = xxx@gmail.com USER = xxx@gmail.com PASSWD = ...... ``` if the default setting for gitea mailing unencrypted, so i need to add some parameters? (What are the default connection options?) Regards, Jan
Author
Owner

@homburgs commented on GitHub (Oct 3, 2019):

Have a look https://docs.gitea.io/en-us/config-cheat-sheet/ at Section Mailer

@homburgs commented on GitHub (Oct 3, 2019): Have a look https://docs.gitea.io/en-us/config-cheat-sheet/ at Section Mailer
Author
Owner

@jayjupdhig commented on GitHub (Oct 3, 2019):

thx

@jayjupdhig commented on GitHub (Oct 3, 2019): thx
Author
Owner

@jayjupdhig commented on GitHub (Oct 3, 2019):

smtp.gmail.com:587 does not work, as described here: https://github.com/gogs/gogs/issues/4310

Then i will look on that manual..

@jayjupdhig commented on GitHub (Oct 3, 2019): smtp.gmail.com:587 does not work, as described here: https://github.com/gogs/gogs/issues/4310 Then i will look on that manual..
Author
Owner

@jayjupdhig commented on GitHub (Oct 3, 2019):

Maybe i need to restart gitea service first before the new config will be applied...(?)

@jayjupdhig commented on GitHub (Oct 3, 2019): Maybe i need to restart gitea service first before the new config will be applied...(?)
Author
Owner

@jayjupdhig commented on GitHub (Oct 3, 2019):

How can i use SSL instead if TLS with Google Mail Server smtp.gmail.com:465 ?

Can't see any options to switch to SSL here: https://docs.gitea.io/en-us/config-cheat-sheet/

@jayjupdhig commented on GitHub (Oct 3, 2019): How can i use SSL instead if TLS with Google Mail Server smtp.gmail.com:465 ? Can't see any options to switch to SSL here: https://docs.gitea.io/en-us/config-cheat-sheet/
Author
Owner

@jayjupdhig commented on GitHub (Oct 3, 2019):

Now it works, thx, i added a few paramters then i restarted the gitea service:

ENABLED        = true
HOST           = smtp.gmail.com:587
FROM           = xxx@gmail.com
USER           = xxx@gmail.com
PASSWD         = ......

MAILER_TYPE    = smtp

IS_TLS_ENABLED = true

Have a nice day, thx again!! :-)

@jayjupdhig commented on GitHub (Oct 3, 2019): Now it works, thx, i added a few paramters then i restarted the gitea service: ``` ENABLED = true HOST = smtp.gmail.com:587 FROM = xxx@gmail.com USER = xxx@gmail.com PASSWD = ...... MAILER_TYPE = smtp IS_TLS_ENABLED = true ``` Have a nice day, thx again!! :-)
Author
Owner

@guillep2k commented on GitHub (Oct 3, 2019):

Perhaps it would be interesting to add this to the docs as a sample GMail configuration?

@guillep2k commented on GitHub (Oct 3, 2019): Perhaps it would be interesting to add this to the docs as a sample GMail configuration?
Author
Owner

@jayjupdhig commented on GitHub (Oct 4, 2019):

Why not, i think GMail server will used a lot...

But i'm not 100% sure the "MAILER_TYPE" parameter is required or not. Maybe it's not. (?)

"IS_TLS_ENABLED" seems to be required, it was not working without it..

@jayjupdhig commented on GitHub (Oct 4, 2019): Why not, i think GMail server will used a lot... But i'm not 100% sure the "MAILER_TYPE" parameter is required or not. Maybe it's not. (?) "IS_TLS_ENABLED" seems to be required, it was not working without it..
Author
Owner

@LostSoulfly commented on GitHub (Jan 11, 2020):

I was not able to use TLS with gmail.. it would fail every time.

However, using port 465 worked for me without TLS..

[mailer]
ENABLED = true
HOST    = smtp.gmail.com:465
FROM    = *********.server@gmail.com
USER    = **********.server@gmail.com
PASSWD  = **************
MAILER_TYPE    = smtp
IS_TLS_ENABLED = false
@LostSoulfly commented on GitHub (Jan 11, 2020): I was not able to use TLS with gmail.. it would fail every time. However, using port 465 worked for me without TLS.. ``` [mailer] ENABLED = true HOST = smtp.gmail.com:465 FROM = *********.server@gmail.com USER = **********.server@gmail.com PASSWD = ************** MAILER_TYPE = smtp IS_TLS_ENABLED = false ```
Author
Owner

@riccardodivirgilio commented on GitHub (Mar 17, 2020):

Hello I'm having trouble with my gmail config:

I get this when testing the config
Failed to send a testing email to 'riccardo@rotostampa.com': gomail: could not send email 1: NewClient: tls: first record does not look like a TLS handshake

My config:

[mailer]
ENABLED        = true
FROM           = workflow.sender@gmail.com
MAILER_TYPE    = smtp
HOST           = smtp.gmail.com:587
IS_TLS_ENABLED = true
USER           = workflow.sender@gmail.com
PASSWD         = `...`
USE_SENDMAIL   = false
@riccardodivirgilio commented on GitHub (Mar 17, 2020): Hello I'm having trouble with my gmail config: I get this when testing the config Failed to send a testing email to 'riccardo@rotostampa.com': gomail: could not send email 1: NewClient: tls: first record does not look like a TLS handshake My config: [mailer] ENABLED = true FROM = workflow.sender@gmail.com MAILER_TYPE = smtp HOST = smtp.gmail.com:587 IS_TLS_ENABLED = true USER = workflow.sender@gmail.com PASSWD = `...` USE_SENDMAIL = false
Author
Owner

@lafriks commented on GitHub (Mar 18, 2020):

please do not comment on closed issues, for community support please use https://discourse.gitea.io/ or Gitea discord chat

@lafriks commented on GitHub (Mar 18, 2020): please do not comment on closed issues, for community support please use https://discourse.gitea.io/ or Gitea discord chat
Author
Owner

@mariusrugan commented on GitHub (Apr 5, 2020):

@riccardodivirgilio as @LostSoulfly above said, confirming it works without IS_TLS_ENABLED=true

[mailer]
ENABLED        = true
HOST           = smtp.gmail.com:587
FROM           = xyz@gmail.com
USER           = xyz@gmail.com
PASSWD         = ***
MAILER_TYPE    = smtp
IS_TLS_ENABLED = false
HELO_HOSTNAME  = example.com
@mariusrugan commented on GitHub (Apr 5, 2020): @riccardodivirgilio as @LostSoulfly above said, confirming it works without IS_TLS_ENABLED=true ``` [mailer] ENABLED = true HOST = smtp.gmail.com:587 FROM = xyz@gmail.com USER = xyz@gmail.com PASSWD = *** MAILER_TYPE = smtp IS_TLS_ENABLED = false HELO_HOSTNAME = example.com ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4055