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
Alo SenAlo Sen 

Getting started with Apex

When I tried running the EmailManager code in this trailhead tutorial in the execute anonymous window I got the following error
Static methods cannot be invoked through an object instance: sendMail(String, String, String)
Has anyone else encountered this error?
Looks like I can only execute this as follows:
EmailManager.sendMail('myemail address', 'Trailhead Tutorial', '123 body');
Alo SenAlo Sen
Sorry, I saw this has been explained in the bottom part of the tutorial