Hi Andrew, yes the java libraries are open source. We do use some paid for libraries but from what you have described, that would not be required.
I've attached our core mail library code for you. There is also an XML file which holds basic config details, for example:
<SMTP>
<SmtpHost value="smtp-outbound-1.mimecast.com" />
<Smtp365Host value="our-domain.mail.protection.outlook.com" />
<SmtpUser value="" />
<SmtpPass value="" />
<SmtpFrom value="noreply@alsico.co.uk" />
<SmtpDebug value="0" />
<SmtpProto value="smtp" />
<SmtpTLS value="1" />
<SmtpAllowMAPI value="0" />
<DebugToFile value="0" />
<DebugLevel value="0" />
</SMTP>
If you share your email address, I would be happy to discuss via Teams etc.
Gary