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
krish99krish99 

send email template to contact

Hi,

      I would like to send a email template to contact based upon opportunity stage changes, may i know how can i achieve this by using trigger.
Satish_SFDCSatish_SFDC
This is possible through a workflow and an email alert action.
However, if you want to use a trigger, you can use a before update trigger on the opportunity.

trigger OpportunityTrigger on Opportunity(before insert, before update){
    //Code to Send the email.
}

Here is how you can send an email.
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_forcecom_email_outbound.htm

Regards,
Satish Kumar
krish99krish99
@Satish

    Can you give me the code for trigger..how to send a mail