+ 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