1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

tcPrettyEmail - A plugin for TeamCity which provides much nicer email.

The default email support in Teamcity is very plain. This plugin sends email more like what users of Cruise control are used to.

Note: Notifications for "responsiblity changed" are silently discarded. Only build notifications are emailed.

Installation

Recent versions are packaged in a zip file that is simply copied into the plugins directory on your TeamCity server.

  • Download the zip file.
  • Locate the plugins directory for your TeamCity? install. This is normally $HOME/.BuildServer/plugins/ If this directory does not exist, you will need to create it.
  • Copy the zip file into your plugins directory.
  • Remove any old versions of the !tcPrettyEmailPlugin
  • Restart Teamcity to load the new plugin.

Configuration

There is only one setting you need to add to TeamCity for the tcPrettyEmail plugin. Configuration is achieved by adding a section to !Teamcity's main-config.xml

This is an example of the minimal config required:

  <pretty-email>
    <smtp host="mail.company.com" from-address="friendly.name@company.com" />
  </pretty-email>

Add a new section to your main-config.xml file. This is normally located in $HOME/.BuildServer/config/

There are many other options that can be added. Having a nicer "from-name" is certainly a recommendation. Here is an example full configuration.

  <pretty-email>
    <smtp host="mail.company.com" port="25" username="mySmtpUsername" password="mySmtpPassword"
          from-address="friendly.name@company.com" from-name="Friendly Name" 
          starttls-enabled="true" />
    <attach-images attach="true" />
    <attachment-path path="/opt/TeamCity/tcPrettyEmail/img/" />
    <template-path   path="/opt/TeamCity/tcPrettyEmail/templates/" />
    <max-tests-to-show value="5" />
    <max-error-lines-to-show value="50" />
  </pretty-email>

Configuration Details

Here is more detail about the expected values for the {{{pretty-email}} children. Attributes for the smtp node

Key Description Format
host The hostname (or IP address) of the mail server text required
port The port of the mail server integer optional (defaults to 25)
username The username (if one is required) to authenticate with the mail server text optional
password The password(if one is required) to authenticate with the mail server text optional
from-address The email address that mail is sent from. text required
from-name A text string used in the from header of the email text optional
starttls-enabled A boolean to say whether to enable STARTTLS support. This is required if you are sending from a Gmail account true|false optional

Attributes for the template-path node

Key Description Format
path The path to an alternate template location. In case you want to override where the plugin looks for templates text optional

Attributes for the attachment-path node

Key Description Format
path The path to an alternate attachment location. In case you want to change the images attached to the email text optional

Attributes for the attach-images node

Key Description Format
attach Controls whether to attach images to email. Some email systems block attachments (or block email messages with attachments) so attachments can be turned off here true|false defaults to true

Attributes for the max-tests-to-show node

Key Description Format
value Control how many failed tests are displayed in the email Integer defaults to 5

Attributes for the max-error-lines-to-show node

Key Description Format
value Control how many lines of compiler errors are displayed in the email Integer defaults to 50