You need to sign in to do that
Don't have an account?
Abdul_
Messaging.sendEmail not compiling for some reason
I have the following method that has been working fine until today, I have not changed anything with the code.
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); if(cc != null) { mail.setCcAddresses(cc); } mail.setToAddresses(toAddresses); mail.setReplyTo('******'); mail.setSenderDisplayName('Salesforce Messaging'); mail.setSubject(subject); mail.setHtmlBody(htmlBody); Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
When I try to deploy I get:
Error: Compile Error: Method does not exist or incorrect signature: void sendEmail(List) from the type Messaging
This started today in both Sandbox and Production.
Does anyone know whats going on?
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); if(cc != null) { mail.setCcAddresses(cc); } mail.setToAddresses(toAddresses); mail.setReplyTo('******'); mail.setSenderDisplayName('Salesforce Messaging'); mail.setSubject(subject); mail.setHtmlBody(htmlBody); Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
When I try to deploy I get:
Error: Compile Error: Method does not exist or incorrect signature: void sendEmail(List) from the type Messaging
This started today in both Sandbox and Production.
Does anyone know whats going on?
make your setToAddresses and setCcAddresses to list string like below.
hope this helps you.
Thanks
karthik