Schedule the Confirmation and Verification Emails

With the Developer Console, you can schedule the SendConfirmationEmails and the SendVerificationEmails Apex class

Required Editions

Available in: Enterprise and Unlimited Editions

Complete these steps to schedule the confirmation and verification emails.

  1. Schedule the ScheduleConfirmationEmails Apex class through the Developer Console.
    We suggest scheduling the ScheduleConfirmationEmails every 5 minutes.

    Sample code for the confirmation email:

    
    for (Integer i = 0; i < 60; i = i + 5) {
        System.schedule('Confirmation ' + i + ' mins', '0 ' + i + ' * * * ?', new safetycloud.ScheduleConfirmationEmails());
    }
    
  2. Schedule the ScheduleVerificationEmails Apex class through the Developer Console.
    We suggest scheduling the ScheduleVerificationEmails every 10 minutes.

    Sample code for the verification email:

    
    for (Integer i = 0; i < 60; i = i + 10) {
        System.schedule('Verification ' + i + ' mins', '0 ' + i + ' * * * ?', new safetycloud.ScheduleVerificationEmails());
    }