+ Start a Discussion

Send Auto Email After Checking Some Conditions and Then Search To ID From DB

I have developed and added an attachment list on Opportunity and Contracts. I want an auto-genrated email to be

sent with two conditions:


1- IF the attached file's name start with 'PRF'.
2- Then I will sent the email to the ID after making a search for 'createdByID' for a record on condition of that contract/opp number in one of my custom objects.


How can I do that? Any idea please.