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

email-setup.en-us.md 1.6 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. ### Gmail
  42. The following configuration should work with GMail's SMTP server:
  43. ```ini
  44. [mailer]
  45. ENABLED = true
  46. HOST = smtp.gmail.com:465
  47. FROM = example@gmail.com
  48. USER = example@gmail.com
  49. PASSWD = ***
  50. MAILER_TYPE = smtp
  51. IS_TLS_ENABLED = true
  52. HELO_HOSTNAME = example.com
  53. ```