I created a method which prints the email body to the console, but I am unable to view it.
public void createCaseCommentFromEmail(){
for (EmailMessage em : (List<EmailMessage>) Trigger.new) {
System.debug('Email HTML Body: '+ em.HtmlBody);
System.debug('Email Text Body: '+ em.TextBody);
}
}
I'm sending the email to a routing address (configured via Email-to-Case) so I set the debug log on the class above (EmailHandler.cls) but nothing appears in the debug logs section nor in the developer console.
How can one debug incoming/outgoing emails?