+ Start a Discussion
nareshnaresh 

i need to send an e-mail to a particular user every day???

i need to send an e-mail to a particular user every day? Please suggest me posible ways to do this?????



Thanks in advance.
Jerome LusinchiJerome Lusinchi
Hi,

You could schedule an apex batch to run every day, that will send the email to your specific user.
check this documentation :
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_batch_interface.htm
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_scheduler.htm

Jerome
Kiran Kumar GottulaKiran Kumar Gottula
@naresh,

Apex Scheduler:You need to create an Apex class (e.g. WeeklyEmailScheduler.cls) that implements the Schedulable interface. Once you do this, the class will appear to you under the Setup > Develop > Classes > Schedule Apex button. And you can then define the schedule for it. Keep in mind the following from the docs however 'Salesforce only adds the process to the queue at the scheduled time. Actual execution may be delayed based on service availability.'

 
nareshnaresh
@jerome @ kiran

Thanks for ur reply. Can i do this by using workflow or workflow time dependent actions???
Kiran Kumar GottulaKiran Kumar Gottula
@Naresh,
Yes, It is possible by using Time dependent workflow.
Jerome LusinchiJerome Lusinchi
Hi Naresh,

It might be possible, but you'll have to try it.
If you create an object, with a checkbox.
you create a time dependant WF that will execute an action 1 day after the Check box is checked
the action of this WF is to uncheck the checkbox.
You create anoter worflow that is triggered when the checkbox change value (ISCHANGED() Function) and the value is uncheck
The action af this workflow is to send your email

the only thing you'll have to do is to create one record , and then update it by checking the checkbox

It is a bit complicated, and i would advise you to do it using the first solution we gave you. Schedule an apex batch
 
Hope this helps.

Jerome
Kiran Kumar GottulaKiran Kumar Gottula
@Jerome, 
I agree with you. :)