All binary (and source) artifacts are available via Maven Central.
The project groupId is org.apache.james and the artifact names are:
Just include something like this in your pom.xml
<dependencies>
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>apache-mailet-api</artifactId>
<version>3.8.1</version>
</dependency>
<!-- other dependencies -->
</dependencies>
To learn how to write your own mailets please have a look at Generic Matcher and Generic Mailet.
Another good learning source are the unit tests from Standard Mailets