docs: document email integration

This commit is contained in:
Daniel Dourvaris 2016-08-11 14:17:52 +03:00
parent 79206c1582
commit 9d83e38374
3 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,23 @@
.. _integrations-email:
Email integration
=================
The email integration allows you to send the summary of repo pushes to a
list of email recipients in the format:
An example::
User: johndoe
Branches: default
Repository: http://rhodecode.company.com/repo
Commit: 8eab60a44a612e331edfcd59b8d96b2f6a935cd9
URL: http://rhodecode.company.com/repo/changeset/8eab60a44a612e331edfcd59b8d96b2f6a935cd9
Author: John Doe
Date: 2016-03-01 11:20:44
Commit Message:
fixed bug with thing
To create one, create a ``email`` integration in `creating-integrations`.

View file

@ -17,6 +17,7 @@ Type/Name |RC| Edition Description
:ref:`integrations-slack` |RCCEshort| https://slack.com/
:ref:`integrations-hipchat` |RCCEshort| https://www.hipchat.com/
:ref:`integrations-webhook` |RCCEshort| POST events as `json` to a custom url
:ref:`integrations-email` |RCEEshort| Send repo push commits by email
:ref:`integrations-redmine` |RCEEshort| Close/Resolve/Reference redmine issues
:ref:`integrations-jira` |RCEEshort| Close/Resolve/Reference JIRA issues
============================ ============ =====================================

View file

@ -71,6 +71,7 @@ def send_email(recipients, subject, body='', html_body='', email_config=None):
log = get_logger(send_email)
email_config = email_config or rhodecode.CONFIG
print email_config
subject = "%s %s" % (email_config.get('email_prefix', ''), subject)
if not recipients:
# if recipients are not defined we send to email_config + all admins