<p>I need to send email through an (external) SMTP server from Java however this server will only accept CRAM-MD5 authentication, which is not supported by JavaMail.</p>

<p>What would be a good way to get these emails to send? (It must be in Java.)</p>

This doesn't help you directly, however, IMAP connections in JavaMail do support SASL (and thus CRAM-MD5, see the
Java SASL documentation
) if you set the
```
mail.imap.sasl.enable
```
boolean property to
```
true
```
.
Unfortunately, there is no
```
mail.smtp.sasl.enable
```
property, and SASL cannot be enabled for SMTP in JavaMail. :-(
However, you can download the
JavaMail source code
, and you can try to edit the SMTP code to support SASL in a similar manner to the IMAP code. Good luck!