How to send email programmatically?

HI all,

I have a SUGARCRM PRO 7.6 installation working correctly with many custom modules. I integrated the platform with another web based financial software that send Sugar some data via a custom rest endpoint. When those data arrive in sugar I need to send an email to related contacts via custom scheduler. In the past I used a PHPMailer function but this one is deprecated so I'd like to use the new Mailer Factory but I can't find some documentation. Has someone already used this new feature and wrote some best practices? Thanks a lot for any information. I will try to set up this feature on my own and if I'll be able to do it I will post the code here.