Problem : How to send email on a daily basis to someone with salesforce.
Solution : First you have to write schedulable apex class.
Here is the code of simple code of schedulable class. Messaging is the namespace and SingleEmailMessage is the class. setSubject and setPlainTextBody are the methods of this class.
global class test1 Implements Schedulable
Then you have to set this schedulable apex on a daily basis . For this :
1.) In setup write apex class.
2.) Click on schedule apex as shown below :
3.) Fill all the required fields.
In apex class you have to give schedulable apex class. select start date, end date and days according to your requirement and save it. That's all
Thanks,
Lovesalesforceyes.
No comments:
Post a Comment