Show More
@@ -1,101 +1,100 b'' | |||||
1 | .. _email: |
|
1 | .. _email: | |
2 |
|
2 | |||
3 | ============== |
|
3 | ============== | |
4 | Email settings |
|
4 | Email settings | |
5 | ============== |
|
5 | ============== | |
6 |
|
6 | |||
7 | The Kallithea configuration file has several email related settings. When |
|
7 | The Kallithea configuration file has several email related settings. When | |
8 | these contain correct values, Kallithea will send email in the situations |
|
8 | these contain correct values, Kallithea will send email in the situations | |
9 | described below. If the email configuration is not correct so that emails |
|
9 | described below. If the email configuration is not correct so that emails | |
10 | cannot be sent, all mails will show up in the log output. |
|
10 | cannot be sent, all mails will show up in the log output. | |
11 |
|
11 | |||
12 | Before any email can be sent, an SMTP server has to be configured using the |
|
12 | Before any email can be sent, an SMTP server has to be configured using the | |
13 | configuration file setting ``smtp_server``. If required for that server, specify |
|
13 | configuration file setting ``smtp_server``. If required for that server, specify | |
14 | a username (``smtp_username``) and password (``smtp_password``), a non-standard |
|
14 | a username (``smtp_username``) and password (``smtp_password``), a non-standard | |
15 | port (``smtp_port``), whether to use "SSL" when connecting (``smtp_use_ssl``) |
|
15 | port (``smtp_port``), whether to use "SSL" when connecting (``smtp_use_ssl``) | |
16 | or use STARTTLS (``smtp_use_tls``), and/or specify special ESMTP "auth" features |
|
16 | or use STARTTLS (``smtp_use_tls``), and/or specify special ESMTP "auth" features | |
17 | (``smtp_auth``). |
|
17 | (``smtp_auth``). | |
18 |
|
18 | |||
19 | For example, for sending through gmail, use:: |
|
19 | For example, for sending through gmail, use:: | |
20 |
|
20 | |||
21 | smtp_server = smtp.gmail.com |
|
21 | smtp_server = smtp.gmail.com | |
22 | smtp_username = username |
|
22 | smtp_username = username | |
23 | smtp_password = password |
|
23 | smtp_password = password | |
24 | smtp_port = 465 |
|
24 | smtp_port = 465 | |
25 | smtp_use_ssl = true |
|
25 | smtp_use_ssl = true | |
26 |
|
26 | |||
27 |
|
27 | |||
28 | Application emails |
|
28 | Application emails | |
29 | ------------------ |
|
29 | ------------------ | |
30 |
|
30 | |||
31 | Kallithea sends an email to `users` on several occasions: |
|
31 | Kallithea sends an email to `users` on several occasions: | |
32 |
|
32 | |||
33 | - when comments are given on one of their changesets |
|
33 | - when comments are given on one of their changesets | |
34 | - when comments are given on changesets they are reviewer on or on which they |
|
34 | - when comments are given on changesets they are reviewer on or on which they | |
35 | commented regardless |
|
35 | commented regardless | |
36 | - when they are invited as reviewer in pull requests |
|
36 | - when they are invited as reviewer in pull requests | |
37 | - when they request a password reset |
|
37 | - when they request a password reset | |
38 |
|
38 | |||
39 | Kallithea sends an email to all `administrators` upon new account registration. |
|
39 | Kallithea sends an email to all `administrators` upon new account registration. | |
40 | Administrators are users with the ``Admin`` flag set on the *Admin > Users* |
|
40 | Administrators are users with the ``Admin`` flag set on the *Admin > Users* | |
41 | page. |
|
41 | page. | |
42 |
|
42 | |||
43 | When Kallithea wants to send an email but due to an error cannot correctly |
|
43 | When Kallithea wants to send an email but due to an error cannot correctly | |
44 | determine the intended recipients, the administrators and the addresses |
|
44 | determine the intended recipients, the administrators and the addresses | |
45 | specified in ``email_to`` in the configuration file are used as fallback. |
|
45 | specified in ``email_to`` in the configuration file are used as fallback. | |
46 |
|
46 | |||
47 | Recipients will see these emails originating from the sender specified in the |
|
47 | Recipients will see these emails originating from the sender specified in the | |
48 | ``app_email_from`` setting in the configuration file. This setting can either |
|
48 | ``app_email_from`` setting in the configuration file. This setting can either | |
49 | contain only an email address, like `kallithea-noreply@example.com`, or both |
|
49 | contain only an email address, like `kallithea-noreply@example.com`, or both | |
50 | a name and an address in the following format: `Kallithea |
|
50 | a name and an address in the following format: `Kallithea | |
51 | <kallithea-noreply@example.com>`. However, if the email is sent due to an |
|
51 | <kallithea-noreply@example.com>`. However, if the email is sent due to an | |
52 | action of a particular user, for example when a comment is given or a pull |
|
52 | action of a particular user, for example when a comment is given or a pull | |
53 | request created, the name of that user will be combined with the email address |
|
53 | request created, the name of that user will be combined with the email address | |
54 | specified in ``app_email_from`` to form the sender (and any name part in that |
|
54 | specified in ``app_email_from`` to form the sender (and any name part in that | |
55 | configuration setting disregarded). |
|
55 | configuration setting disregarded). | |
56 |
|
56 | |||
57 | The subject of these emails can optionally be prefixed with the value of |
|
57 | The subject of these emails can optionally be prefixed with the value of | |
58 | ``email_prefix`` in the configuration file. |
|
58 | ``email_prefix`` in the configuration file. | |
59 |
|
59 | |||
60 | A Kallithea-specific header indicating the email type will be added to each |
|
60 | A Kallithea-specific header indicating the email type will be added to each | |
61 | email. This header can be used for email filtering. The header is of the form: |
|
61 | email. This header can be used for email filtering. The header is of the form: | |
62 |
|
62 | |||
63 | X-Kallithea-Notification-Type: <type> |
|
63 | X-Kallithea-Notification-Type: <type> | |
64 |
|
64 | |||
65 | where ``<type>`` is one of: |
|
65 | where ``<type>`` is one of: | |
66 |
|
66 | |||
67 | - ``pull_request``: you are invited as reviewer in a pull request |
|
67 | - ``pull_request``: you are invited as reviewer in a pull request | |
68 | - ``pull_request_comment``: a comment was given on a pull request |
|
68 | - ``pull_request_comment``: a comment was given on a pull request | |
69 | - ``cs_comment``: a comment was given on a changeset |
|
69 | - ``cs_comment``: a comment was given on a changeset | |
70 | - ``registration``: a new user was registered |
|
70 | - ``registration``: a new user was registered | |
71 | - ``message``: another type of email |
|
71 | - ``message``: another type of email | |
72 |
|
72 | |||
73 |
|
73 | |||
74 | Error emails |
|
74 | Error emails | |
75 | ------------ |
|
75 | ------------ | |
76 |
|
76 | |||
77 | When an exception occurs in Kallithea -- and unless interactive debugging is |
|
77 | When an exception occurs in Kallithea -- and unless interactive debugging is | |
78 | enabled using ``set debug = true`` in the ``[app:main]`` section of the |
|
78 | enabled using ``set debug = true`` in the ``[app:main]`` section of the | |
79 |
configuration file -- an email with exception details is sent by |
|
79 | configuration file -- an email with exception details is sent by backlash_ | |
80 |
|
|
80 | to the addresses specified in ``email_to`` in the configuration file. | |
81 | configuration file. |
|
|||
82 |
|
81 | |||
83 | Recipients will see these emails originating from the sender specified in the |
|
82 | Recipients will see these emails originating from the sender specified in the | |
84 | ``error_email_from`` setting in the configuration file. This setting can either |
|
83 | ``error_email_from`` setting in the configuration file. This setting can either | |
85 | contain only an email address, like `kallithea-noreply@example.com`, or both |
|
84 | contain only an email address, like `kallithea-noreply@example.com`, or both | |
86 | a name and an address in the following format: `Kallithea Errors |
|
85 | a name and an address in the following format: `Kallithea Errors | |
87 | <kallithea-noreply@example.com>`. |
|
86 | <kallithea-noreply@example.com>`. | |
88 |
|
87 | |||
89 | *Note:* The WebError_ package does not respect ``smtp_port`` and assumes the |
|
88 | *Note:* The WebError_ package does not respect ``smtp_port`` and assumes the | |
90 | standard SMTP port (25). If you have a remote SMTP server with a different port, |
|
89 | standard SMTP port (25). If you have a remote SMTP server with a different port, | |
91 | you could set up a local forwarding SMTP server on port 25. |
|
90 | you could set up a local forwarding SMTP server on port 25. | |
92 |
|
91 | |||
93 |
|
92 | |||
94 | References |
|
93 | References | |
95 | ---------- |
|
94 | ---------- | |
96 |
|
95 | |||
97 | - `Error Middleware (Pylons documentation) <http://pylons-webframework.readthedocs.org/en/latest/debugging.html#error-middleware>`_ |
|
96 | - `Error Middleware (Pylons documentation) <http://pylons-webframework.readthedocs.org/en/latest/debugging.html#error-middleware>`_ | |
98 | - `ErrorHandler (Pylons modules documentation) <http://pylons-webframework.readthedocs.org/en/latest/modules/middleware.html#pylons.middleware.ErrorHandler>`_ |
|
97 | - `ErrorHandler (Pylons modules documentation) <http://pylons-webframework.readthedocs.org/en/latest/modules/middleware.html#pylons.middleware.ErrorHandler>`_ | |
99 |
|
98 | |||
100 |
|
99 | |||
101 | .. _WebError: https://pypi.python.org/pypi/WebError |
|
100 | .. _WebError: https://pypi.python.org/pypi/WebError |
General Comments 0
You need to be logged in to leave comments.
Login now