Sending an email with attachements

Sending an email with attachements
0
ObjectDB obj = getGrant().getTmpObject("myObject");
ObjectField myObjectFile = obj.getField("myObjFile"); // must be of type file

// https://www.simplicite.io/resources/4.0/javadoc/com/simplicite/util/tools/MailTool.html
MailTool mail = new MailTool(getGrant());
mail.addRcpt("contact@null.fr");
mail.setSujet("Test Mail");
mail.addAttach(obj, myObjectFile); 
mail.setBody("<p>Hello</p>");
mail.send();