Skip to content

MailInstruction element

Markus Hastreiter edited this page Mar 23, 2019 · 1 revision

<MailInstruction> element

The <MailInstruction> element is used to send mails. RepoCop uses the MailMessage class to built the e-mail, therefore most of the attributes correspond with the equivalent property names of the MailMessage class.

If you are using the <MailInstruction> element you must specify an SMTP server using the <SmptServer> element.

Attributes

Attribute name Status Default Description
Body mandatory The message body.
Subject mandatory The subject line.
ToMailAddresses mandatory The e-mail addresses the message will be send to. Multiple e-mail addresses must be separated with a comma character (",").
BodyTemplateFile optional Instead of specifying a message Body in the RepoCop configuration, for complex mail messages it is more convenient to write the mail body as an external ascii file and specify this file here. As with the Body attribute, this body template can use the Replacements. Note: the body template file must either be located in the same folder as RepoCop, or you must specify the full path.
CcMailAddresses optional The e-mail addresses the message will be send to as cc. Multiple e-mail addresses must be separated with a comma character (",").
BccMailAddresses optional The e-mail addresses the message will be send to as bcc. Multiple e-mail addresses must be separated with a comma character (",").
FromMailAddress optional The e-mail address that will appear as the sender of this e-mail.
ReplyToMailAddress optional The e-mail address to reply to.

Example

  <!-- Notify project leader about every change -->
  <MailInstruction FromMailAddress="#author#@mydomain.com" ToMailAddresses="projectleader@mydomain.com" Subject="Svn ##revision#" Body="#logmessage#"/>