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
javonjavon 

Is it possible to let the system send automated emials from a force.com site?

Hi I am new and have just created my first force.com app,

 

I wondered If I can build a functionality that let me send a predefined email by just clicking on a button, or automatically after x-days or so.

 

Basically It should take some information from fields of that cutom object with predefined content to receipients. These receipients are also contact shown (with lookup fields) in the "custom object site".

 

Appreciate any help

Thanks

Cool_DevloperCool_Devloper

For a button click, you can write an apex method in your site controller which will send the emails. Refer to the apex email classes for details!

For automated emails, you can create a time-dependent workflow and attach an "Email Alert" to it based on the requisite criteria!

Hope this helps...

Cool_D

RyanGuestRyanGuest

Here is a good blog post about sending email from an Apex class:

 

 

http://salesforceexperts.blogspot.com/2009/07/sending-email-from-your-apex-class.html