You can use SimplaJavaMail: use EmailPopulationBuilder and EMailBuilder to encode subject, body and attachments with your certificate. Than, with EMailConverter you get a MimeMessage. Get a ByteStream out of it, and this one you can send , base64-encoded, with the sendMail-endpoint of the GraphApi.
Unfortunately this only works for attachment-Size < 3MB.
With attachments >= 3MB you have to follow the graph-api doc., see https://learn.microsoft.com/de-de/graph/outlook-large-attachments?tabs=http and https://learn.microsoft.com/de-de/graph/sdks/large-file-upload?tabs=java.
Its unclear how to combine these two approaches.