function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

how to send an mail with body displaying visualforce page

i am displaying the event meeting details in the visual force page inside an html table. I want the same to be displayed as the body of the mail. i dont want it to be in the attachments of the mail.
Try this: Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); PageReference pageRef = new PageReference('/apex/YOUR_VF_NAME'); String content = String.valueOf(pageRef.getContent()); mail.setBody(content);