getting the error

Method does not exist or incorrect signature: [Messaging.SingleEmailMessage].setBCCaddress(List)

from the code

public PageReference show() 
    messaging.singleemailmessage mail=new messaging.singleemailmessage();
    string[] tobcc=new string[]{'sfdccharan@gmail.com','nchnaidu12@gmail.com'};
    string[] tocc= new string[]{'narracharan4@gmail.com'};
    string[] to=new string[]{'charansfdc511@gmail.com'};
    mail.setplaintextbody('Hai CharanKumar Narra');
    mail.sethtmlbody('<h1> this is an test html</h1>');
    messaging.sendemail(new messaging.singleemailmessage[]{mail});

        return null;

You should use setBccAddresses(List<String>) instead of setBccAddress(List<String>). You are missing es from the end of the function name.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.