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
LeonardLeonard 

How do I write a trigger to send an email?

I want a trigger to send an email when a new custom object has been upserted.
werewolfwerewolf

Have you tried just doing that with a workflow first?

 

You can send email from Apex like this, but on the surface at least it sounds like this is something you could do with workflow.