You need to sign in to do that
Don't have an account?
Table as String: Urgent
mail.setPlainTextBody('------------------------------------------------------------------------------------------------------------
S.No *** Object Name *** Count Of Records Created Today *** Count Of Records Modified Today *****
1 *** Account *** TotalCount[0] *** TotalCount[1] *****
2 *** Leads *** TotalCount[2] *** TotalCount[3] *****
3 *** Opportunity *** TotalCount[4] *** TotalCount[5] *****
4 *** Contacts *** TotalCount[6] *** TotalCount[7] *****
5 *** Activities *** TotalCount[8] *** TotalCount[9] *****
------------------------------------------------------------------------------------------------------------- ');
How to set the above value as string for sending mail???
try like this.
String Description = '------------------------------------------------------------------------------------------------- \n\n'
+ ' S.No *** Object Name *** Count Of Records Created Today *** Count Of Records Modified Today ***** \n'
+ ' 1 *** Account *** ' + getTotalCount() + ' *** ' + getTotalCount() + ' ***** \n '
+ ................
+..........
+...... ;
final Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
................
.............
.............
mail.setPlainTextBody(description);
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
Thanks,
Sarv
If the records are dynamically generated,
then use HTML table to achieve the requirement.