• Brahian Calo 7
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
What do you think about new Javascript Certification?
How can I set up properly LWC with Typescript? 
How can I set up properly LWC with Typescript? 
I am working in Visual studio code, I am passing some values to this priceMail() method while calling from the js file. I have got the 'success' msg, but the mail is not send
 @AuraEnabled
    public static String priceMail(String name, String email, Double cost) {
        // Create an email message object
        String sMessage='';
        String subject = 'Price List';
        String body = 'Dear ' + name + '/n' + 'ggg' + cost;
        try{
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        String[] toAddresses = new String[] {email};
        mail.setToAddresses(toAddresses);
        mail.setSubject(subject);
        mail.setPlainTextBody(body);
        // Pass this email message to the built-in sendEmail method 
        // of the Messaging class
       Messaging.sendEmail( new Messaging.SingleEmailMessage[] { mail });
        sMessage='Success';
        }
        catch(Exception ex){
            sMessage=ex.getLineNumber()+'\n'+ex.getCause()+'\n'+ex.getMessage()+'\n'+ex.getStackTraceString();
        }
        return sMessage;
      
    
    }