Knowledge base

Java submission API

Java Submission API
The second of five

The Java submission binding is the second of five in the chapter: pmta.jar is added to the classpath, and for working through JavaMail the supplied javamail.providers file is installed.

The description is in JavaDoc format: on Linux — /opt/pmta/api/java/doc/javadoc/index.html, on Windows — the pmtajavadoc.zip archive in the api\java folder. Java 6 or later is required, and for JavaMail also the JavaMail and Java Activation Framework libraries.

The JavaMail provider is the main convenience: an application written for JavaMail can submit through the node without being rewritten for the binding’s own interface.

The main trap is looking for method descriptions in the manual. The chapter only gives the path to JavaDoc: methods and their behavior are described there, not in the section.
What the Hub does. Not used: the Hub submits messages to the node over SMTP.
Recommended values

What is where:

What Where
library pmta.jar in the classpath
working through JavaMail the javamail.providers file
description on Linux /opt/pmta/api/java/doc/javadoc/index.html
description on Windows pmtajavadoc.zip in api\java
version Java 6 and later
The library, the JavaMail provider, the description locations and the Java version come from the manual (§ 7.3, § 7.1). The table is ours.
Example configuration
# add the binding library when starting the application
java -cp pmta.jar:app.jar com.example.Sender
pmta.jar is taken from the installation’s bindings directory; the application names are for illustration.
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.
Compatibility
PowerMTA 6.0
described in the manual of this version · platform: any
The vendor does not state the first version for every directive — there is no note here. The name also appears in the 5.0 edition of the manual.
How to check on the node
Check that the binding description is in place:
ls /opt/pmta/api/java/doc/javadoc/index.html
The description file exists — the Java binding is installed.
In the Hub
Cost of a mistake
safe: a wrong value breaks nothing
Scenarios
Connect a sending platform