7.10.5 - How to send an email in hook method?


I need to send an email with an .ics file (calendar invitation) after creating a task to the assigned user.

I’ve tried to use workflows and the send email action, but SuiteCRM puts lots of controls in the email besides the text I am trying so send (yes, I check the send plain text option).

Using a meeting instead of a task is not an option.

Does anyone know how to do it? I am reading and understanding the meeting logic for sending invitation, but so far I only got frustrated.

Thanks in advance,

SuiteCRM includes phpMailer, just use it directly from the hook, and you will get complete control.

You have all the examples you might need here


start by trying it with the SugarPHPMailer class, like here


Tks a lot, pgr!