You need to sign in to do that
Don't have an account?

Send email through Apex
Hi All,
Can anyone please help me.
I need to send a email from apex. can you please give me some example.
what i wanna do is....
if any field edited in the record. I wanna send a mail with the field name ("Name") and the new value("Senthil")
Thanks.
Hi,
Here is a simple way to send mail via Apex.
However in the above code we are hardcoding the address to which the mail needs to be sent.
In case you want to make it more dynamic, you can use Custom Settings (App Setup -> Develop -> Custom Settings) and create a mailing list.
The below code uses a Mailing list "AddrGrp__c" in which the list of "To address", "Reply To address" is set.
Hope this helps you.
Regards,
Lakshmi.
Hi,
Did the above solve your problem ? If so please mark it as solution so that others may benefit. If not please let me know what went wrong.
Regards,
Lakshmi.