How to notify by email only the users concerned

Hello to all,
I ask for your help to finalize the configuration of the email notification.

I’m using Gitea 1.17.3 on Debian, a self-hosted Gitea with some users (LDAP)

I managed to configure the service.
The test mail works and once the service is activated.

All actions are notified to all users.

Is there a way to restrict notifications to organization member, team, project or based on action type.

during my research I came across many penitents in the same case.

Many posts are two to three years old.
What is the status of the notification system?
What does it allow you to do?

https://github.com/go-gitea/gitea/blob/main/modules/notification/mail/mail.go

I saw that there is mention of mail templates.
some suggest using templates as a means of channeling mail notifications
however I cannot find these template files in my system

1 Like

Here is my mesh configuration for those like me looking for an example.
my configuration is basic and perfectible and unsafe, because other precautions are taken elsewhere.

for some reason I had to mix the configuration of v1.17 and v1.18 to work

[service]
;; Mail notification ;; spam tous les utilisateurs
ENABLE_NOTIFY_MAIL                = true


[mailer]
ENABLED                 = true
;; Mail server
;; Protocol. One of "smtp", "smtps", "smtp+starttls", "smtp+unix", "sendmail", "dummy".
;; - sendmail: use the operating system's `sendmail` command instead of SMTP. This is common on Linux systems.
;; - dummy: send email messages to the log as a testing phase.
;; If your provider does not explicitly say which protocol it uses but does provide a port,
;; you can set SMTP_PORT instead and this will be inferred.
;; (Before 1.18, see the notice, this was controlled via MAILER_TYPE and IS_TLS_ENABLED.)
PROTOCOL                = smtp          ;;# 1.18 #
;;
;; Mail server address, e.g. smtp.gmail.com.
;; For smtp+unix, this should be a path to a unix socket instead.
;; (Before 1.18, see the notice, this was combined with SMTP_PORT as HOST.)
SMTP_ADDR               = IP_ADRESS                ;;# 1.18 #
;;
;; Mail server port. Common ports are:
;;   25:  insecure SMTP
;;   465: SMTP Secure
;;   587: StartTLS
;; If no protocol is specified, it will be inferred by this setting.
;; (Before 1.18, this was combined with SMTP_ADDR as HOST.)
SMTP_PORT               = 25            ;;# 1.18 #

;; Mail server
;; Gmail: smtp.gmail.com:587
;; QQ: smtp.qq.com:465
;; As per RFC 8314 using Implicit TLS/SMTPS on port 465 (if supported) is recommended,
;; otherwise STARTTLS on port 587 should be used.
HOST                    = IP_ADRESS:25
;;
;;
;; Whether or not to skip verification of certificates; `true` to disable verification. This option is unsafe. Consider adding the certificate to the system trust store instead.
SKIP_VERIFY             = true
;;
;;
;; Should SMTP connect with TLS, (if port ends with 465 TLS will always be used.)
;; If this is false but STARTTLS is supported the connection will be upgraded to TLS opportunistically.
IS_TLS_ENABLED          = false
;;
;; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
FROM                    = toto@domaine.fr
;;
;;
;; Set Mailer Type (either SMTP, sendmail or dummy to just send to the log)
MAILER_TYPE             = smtp
;;

reading the example file helped me a lot

Hi all Gitea enthusiasts :slight_smile:

Both me and the Ubertus.org team are also interested in more information about the configuration of Gitea’s email notification

Any volunteer familiar with Gitea configuration of its email notification?

After we get more information. Both me and the Ubertus team would be happy, as volunteer, to contribute testing and documentation, if needed.

@Francewhoa, this is a note to myself

Related comment and front end screenshots about a frequent challenge about the present need for more documentation about Gitea email notification. Including, but not limited to, activate email notification, or deactivate, or allowing each user to decide if they need notification at https://forum.gitea.com/t/gitea-is-not-sending-notifications/6308/5

I refer you to the answer of @Francewhoa on another related topic.
which perfectly answers my problem but taken upside down

how to close the topic?

1 Like