You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

email-setup.en-us.md 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. ---
  2. date: "2019-10-15T10:10:00+05:00"
  3. title: "Usage: Email setup"
  4. slug: "email-setup"
  5. weight: 12
  6. toc: true
  7. draft: false
  8. menu:
  9. sidebar:
  10. parent: "usage"
  11. name: "Email setup"
  12. weight: 12
  13. identifier: "email-setup"
  14. ---
  15. # Email setup
  16. To use Gitea's built-in Email support, update the `app.ini` config file [mailer] section:
  17. ## Sendmail version
  18. Use the operating system’s sendmail command instead of SMTP. This is common on Linux servers.
  19. Note: For use in the official Gitea Docker image, please configure with the SMTP version.
  20. ```ini
  21. [mailer]
  22. ENABLED = true
  23. FROM = gitea@mydomain.com
  24. MAILER_TYPE = sendmail
  25. SENDMAIL_PATH = /usr/sbin/sendmail
  26. ```
  27. ## SMTP version
  28. ```ini
  29. [mailer]
  30. ENABLED = true
  31. FROM = gitea@mydomain.com
  32. MAILER_TYPE = smtp
  33. HOST = mail.mydomain.com:587
  34. IS_TLS_ENABLED = true
  35. USER = gitea@mydomain.com
  36. PASSWD = `password`
  37. ```
  38. - Restart Gitea for the configuration changes to take effect.
  39. - To send a test email to validate the settings, go to Gitea > Site Administration > Configuration > SMTP Mailer Configuration.
  40. For the full list of options check the [Config Cheat Sheet]({{< relref "doc/advanced/config-cheat-sheet.en-us.md" >}})
  41. - Please note: authentication is only supported when the SMTP server communication is encrypted with TLS or `HOST=localhost`. TLS encryption can be through:
  42. - Via the server supporting TLS through STARTTLS - usually provided on port 587. (Also known as Opportunistic TLS.)
  43. - SMTPS connection (SMTP over transport layer security) via the default port 465.
  44. - Forced SMTPS connection with `IS_TLS_ENABLED=true`. (These are both known as Implicit TLS.)
  45. - This is due to protections imposed by the Go internal libraries against STRIPTLS attacks.
  46. ### Gmail
  47. The following configuration should work with GMail's SMTP server:
  48. ```ini
  49. [mailer]
  50. ENABLED = true
  51. HOST = smtp.gmail.com:465
  52. FROM = example@gmail.com
  53. USER = example@gmail.com
  54. PASSWD = ***
  55. MAILER_TYPE = smtp
  56. IS_TLS_ENABLED = true
  57. HELO_HOSTNAME = example.com
  58. ```