The following configuration properties are expected:
factory | mandatory | package.class | The worker factory, should be org.tastybug.bugwerk.bugtrap.worker.smtp.SMTPWorkerFactory |
format | optional, defaults to Txt | package.class | An AbstractMailBuilder implementation (a factory responsible for the creation of mail messages). |
autoconnect | optional, defaults to false | true,false | When set to true, the plugin automatically mails unreported tickets whenever something is added to, removed from or modified in the connected ticketqueue AND when buffersize is reached. When set to false, you have to trigger the distribution manually. |
buffersize | optional, defaults to 1 | int | The minimum number of unreported tickets (with at least minincidents incidents) that have to reside in the ticket queue before the plugin starts to auto-distribute unreported tickets. |
minincidents | optional, defaults to 1 | int | The minimum number of incidents in a ticket before it will be auto-distributed. This property is not considered whenever you manually trigger the distribution: triggering the distribution manually results in the reporting of all yet unreported tickets. |
pop3.host | optional, upon auth=popbeforesmtp | string | The POP3 hostname or IP. |
smtp.host | mandatory | string | The MTA hostname or IP. |
smtp.port | optional, defaults to 25 | int | The MTAs transport service port. |
auth | optional, defaults to none | none,smtp,popbeforesmtp | The authentication method: when popbeforesmtp is set, pop3.host, pop3.user and pop3.pass must be set, upon smtp smtp.user and smtp.pass is expected, otherwise no authentication is performed. |
smtp.user | optional, upon auth=smtp | string | The mail account user name on the MTA; should be set when the MTA requires authentication. |
smtp.pass | optional, upon auth=smtp | string | The password of the smtp account user. |
pop3.user | optional, upon auth=smtp | string | The POP3 account user name on the MTA; should be set when the MTA requires POP-before-SMTP authentication. |
pop3.pass | optional, upon auth=smtp | string | The password of the POP3 account user, should be set when the MTA requires POP-before-SMTP authentication.. |
from | mandatory | string | The mail from-address, must be a valid non-strict javax.mail.internet.InternetAddress.. |
to | mandatory | string | The mail receipient address; must be a valid non-strict javax.mail.internet.InternetAddress. |
cc | optional | string | The mail cc receipient addresses; all must be valid non-strict javax.mail.internet.InternetAddress. |
bcc | optional | string | The mail bcc receipient addresses; all must be valid non-strict javax.mail.internet.InternetAddress. |
separator | optional, defaults to , | string | A string containing all valid separators for address lists like bcc and cc |
Following an example configuration for a project named myProject that binds the BugTrap-SMTP plugin. The following behaviour is requested: the plugin shall listen for events from the ticket queue and start to auto distribute the incident reports whenever at least 5 yet unreported reportable tickets are present within the queue. An unreported ticket with at least 2 incidents is considered to be reportable. Reportable incidents are to be send to incident.receiver@host.com, using the MTA at mta.host.com, mails are to be HTML-formatted. (See also: Example.java)
bugtrap.projectname=myProject bugtrap.projectversion=0.01 bugtrap.worker=mail,anotherworker bugtrap.maxincidents=2 mail.factory=org.tastybug.bugwerk.bugtrap.worker.smtp.SMTPWorkerFactory mail.format=org.tastybug.bugwerk.bugtrap.worker.smtp.html.HTMLMailBuilder mail.autoconnect=true mail.buffersize=5 mail.minincidents=2 mail.smtp.auth=smtp mail.smtp.user=mta.user.name mail.smtp.pass=password mail.smtp.host=mta.host.com mail.from=incident.sender@host.com mail.to=incident.receiver@host.com mail.cc=address1@host.com,address2@host.com mail.bcc=address3@host.com,address4@host.com anotherworker.factory=... ...