postman:send-mail

Full name:

ch.fortysix:maven-postman-plugin:0.1.6:send-mail

Description:

Sends a mail with optional attachments.

Attributes:

  • Requires a Maven 2.0 project to be executed.

Required Parameters

Name Type Since Description
from String - Email address of sender.
receivers Set - Who should receive a mail? One can use an id of a developer registered in the pom or an email address directly.
<receivers>
<receiver>developerId</receiver>
<receiver>sam@topland.com</receiver>
</receivers>

Optional Parameters

Name Type Since Description
failonerror boolean - flag to indicate whether to halt the build on any error. The default value is true.
Default value is: true.
fileSets List - A list of fileSets to be attached to the mail.
htmlMessage String - The html message body to be send
Default value is: <body>build for ${project.groupId}:${project.artifactId}:${project.version} executed</body>.
htmlMessageFile File - The html message body to be send, if set the content of this will replace the htmlMessage.
mailAltConfig boolean - Indicates to use an alternative way to configure the ssl connection to the smtp server. This might be needed in specific environments.
Default value is: false.
mailcontenttype String - The content type to use for the message. This is only the fallback contenttype if the environment does not support 'multipart/alternative'.
Default value is: text/html.
mailhost String - Host name of the SMTP server. The default value is localhost.
Default value is: localhost.
mailpassword String - Password for SMTP auth
mailport String - TCP port of the SMTP server. The default value is 25.
Default value is: 25.
mailssl boolean - Indicates whether you need TLS/SSL
Default value is: false.
mailuser String - User name for SMTP auth
multipartSupported boolean - Whether 'multipart/alternative' mails can be send. This is detected automatically, but it allows a user to disable it and force the usage of 'mailcontenttype'.
Default value is: true.
outputDirectory File - Report output directory. Note that this parameter is only relevant if the goal is run from the command line or from the default build lifecycle. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.
Default value is: ${project.reporting.outputDirectory}.
skip boolean - Indicates whether this report should skip the sending mails (no mails send).
Default value is: false.
sourceEncoding String - Encoding of the source. Advice is taken from: POM Element for Source File Encoding
Default value is: ${project.build.sourceEncoding}.
subject String - Email subject line.
Default value is: [${project.artifactId}].
textMessage String - The text message to be send
Default value is: build for ${project.groupId}:${project.artifactId}:${project.version} executed.
textMessageFile File - The text message body to be send, if set the content of this will replace the textMessage.

Parameter Details

failonerror:

flag to indicate whether to halt the build on any error. The default value is true.
  • Type: boolean
  • Required: No
  • Default: true

fileSets:

A list of fileSets to be attached to the mail.
  • Type: java.util.List
  • Required: No

from:

Email address of sender.
  • Type: java.lang.String
  • Required: Yes

htmlMessage:

The html message body to be send
  • Type: java.lang.String
  • Required: No
  • Default: <body>build for ${project.groupId}:${project.artifactId}:${project.version} executed</body>

htmlMessageFile:

The html message body to be send, if set the content of this will replace the htmlMessage.
  • Type: java.io.File
  • Required: No

mailAltConfig:

Indicates to use an alternative way to configure the ssl connection to the smtp server. This might be needed in specific environments.
  • Type: boolean
  • Required: No
  • Default: false

mailcontenttype:

The content type to use for the message. This is only the fallback contenttype if the environment does not support 'multipart/alternative'.
  • Type: java.lang.String
  • Required: No
  • Default: text/html

mailhost:

Host name of the SMTP server. The default value is localhost.
  • Type: java.lang.String
  • Required: No
  • Expression: ${mailhost}
  • Default: localhost

mailpassword:

Password for SMTP auth
  • Type: java.lang.String
  • Required: No

mailport:

TCP port of the SMTP server. The default value is 25.
  • Type: java.lang.String
  • Required: No
  • Expression: ${mailport}
  • Default: 25

mailssl:

Indicates whether you need TLS/SSL
  • Type: boolean
  • Required: No
  • Default: false

mailuser:

User name for SMTP auth
  • Type: java.lang.String
  • Required: No

multipartSupported:

Whether 'multipart/alternative' mails can be send. This is detected automatically, but it allows a user to disable it and force the usage of 'mailcontenttype'.
  • Type: boolean
  • Required: No
  • Default: true

outputDirectory:

Report output directory. Note that this parameter is only relevant if the goal is run from the command line or from the default build lifecycle. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.
  • Type: java.io.File
  • Required: No
  • Default: ${project.reporting.outputDirectory}

receivers:

Who should receive a mail? One can use an id of a developer registered in the pom or an email address directly.
<receivers>
<receiver>developerId</receiver>
<receiver>sam@topland.com</receiver>
</receivers>
  • Type: java.util.Set
  • Required: Yes

skip:

Indicates whether this report should skip the sending mails (no mails send).
  • Type: boolean
  • Required: No
  • Default: false

sourceEncoding:

Encoding of the source. Advice is taken from: POM Element for Source File Encoding
  • Type: java.lang.String
  • Required: No
  • Expression: ${encoding}
  • Default: ${project.build.sourceEncoding}

subject:

Email subject line.
  • Type: java.lang.String
  • Required: No
  • Default: [${project.artifactId}]

textMessage:

The text message to be send
  • Type: java.lang.String
  • Required: No
  • Default: build for ${project.groupId}:${project.artifactId}:${project.version} executed

textMessageFile:

The text message body to be send, if set the content of this will replace the textMessage.
  • Type: java.io.File
  • Required: No