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
b.db.d 

Trouble with Email via Apex

I was wondering if anyone had any similar issues:

I created and tested a trigger + Apex class to send a plain-text email when certain changes were made to Account objects. It behaves as I would expect in the developer environment.

When I deploy (successfully) to the production environment, I never receive the emails. I have tested that I am able to receive emails from Salesforce in general (all the IP addresses), and the specific user is able to send emails as well.

Is there anywhere to see a log of email creations, of calls to the Apex class, etc.? Or am I just missing something obvious?
JimRaeJimRae
There are 2 ways you could monitor your trigger in the production environment.  One, the easiest, would be to open the System Log window, and then modify an Account in a way that would cause your trigger to fire.  You should see the debug log in the system log window, including any system.debug statements you had embedded in your code.  The other way would be to go into setup, and open the monitoring section, and add the test user to the debug log monitor.  if the test user causes the trigger to fire, you would see the results in the log, and could "view" the output of the debug code.