+ 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