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
Rakhi B 10Rakhi B 10 

How to send email process builder using

v varaprasadv varaprasad
Hi Rakhi,

Please check once the following link, hope this will helps you.

https://automationchampion.com/tag/send-an-email-process-builder/

Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.

Thanks
Varaprasad
@For Support: varaprasad4sfdc@gmail.com
 
Rakhi B 10Rakhi B 10
HI,
how  to send email using process builder  and also using  apex class can any one explan
 
v varaprasadv varaprasad
HI Rakhi,

Please check sample code below.

 
public class sendAnEmail
{
    @InvocableMethod(label='Send an email from apex class' description='sends an email')
    public static void sendEmailWithAttachment(List<id> listofQuoteHeader)
    {
           for(Id QuoteHeaderid :listofQuoteHeader)
           {
               PageReference pref= page.Quote_PDF;
               pref.getParameters().put('id',(Id)QuoteHeaderid);
               pref.setRedirect(true);
               
               Attachment attachment = new Attachment();      
               Blob b=pref.getContentAsPDF();
               attachment.Body = b;
               attachment.Name = Datetime.now().format('yyyy-MM-dd HH:mm') + ' ' + 'Quote' + '.pdf';
               attachment.IsPrivate = false;
               attachment.ParentId = QuoteHeaderid;
               insert attachment;
               
               Messaging.SingleEmailMessage semail= new Messaging.SingleEmailMessage();
               Messaging.EmailFileAttachment attach= new Messaging.EmailFileAttachment();
               attach.setBody(pref.getContentAsPDF());
               semail.setSubject('Quote Issued');
               String[] emailIds= new String[]{'**********@gmail.com'};
               semail.setToAddresses(emailIds);
               semail.setPlainTextBody('Please find the attached quote details');
               semail.setFileAttachments(new Messaging.EmailFileAttachment[]{attach});
               Messaging.sendEmail(new Messaging.SingleEmailMessage[]{semail});
           }
    }

}
Please check once below links also :

https://www.linkedin.com/pulse/sending-email-attachment-using-process-builder-shweta-soparkar-/

Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.

Thanks
Varaprasad
@For Support: varaprasad4sfdc@gmail.com​