WHile working on an Apex Script, I ran into this error (while testing it) Line: 4, Column: 14 Method does not exist or incorrect signature: void sendMail(String, String, String) from the type EmailManager
Is there a reason why? Please let me know. Thank you.
This is the Apex code:
public class EmailManager
{
public static void sendMail(String address, String subject, String body) {
Messaging.SingleEmailMessage mail = new
Messaging.SingleEmailMessage();
String[] toAddresses = new String[] {address};
mail.setToAddresses(toAddresses);
mail.setSubject(subject);
mail.setPlainTextBody(body);
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
}
}