I have created a email service to receive a emil from a provided email id I want to print the emiail body in debug log for this I write some debug to that but my problem is nothing get printes in debug log so will you please suggest me how to print email body in debug log.
My email service class code -
global class ProcessCaseEmail implements Messaging.InboundEmailHandler
{
ProcessCaseEmail ()
{
System.debug('=======');
}
global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email,Messaging.InboundEnvelope envelope)
{
Messaging.InboundEmailResult result = new Messaging.InboundEmailresult();
String myPlainText= '';
myPlainText = email.plainTextBody;
System.debug('Plain text+++++++++++' + myPlainText );
List<String> parts = myPlainText.split('\n');
List<String> columns;
for(integer i=0;i<parts.size();i++)
{
System.debug('Parts+++++ ['+i+'] '+parts[i] );
system.debug('Length of the parts ['+i+'] '+parts[i].length());
}
return result;
}
}