+ Start a Discussion
abhishek gupta 299abhishek gupta 299 

Mail send functionality is not working on Einstein chatbot

I am trying to send email using einstein chatbot by implementing the action i.e Send email filed all values accordingly but the mail is not send and when I debug the response is IsSuccess=true.After I tried with invicable apex method and tried to send mail via 

 Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage();
            String emailAddress='abhishek.gupta@cloudanalogy.com';
            message.setSubject('Mail from bot');
            message.setToAddresses(new String[] {emailAddress});
            message.setHtmlBody('hii, thanks for giving us your time.');
            System.debug('message--> ' + message);
            Messaging.SendEmailResult [] r =Messaging.sendEmail(new Messaging.SingleEmailMessage[] { message });
But the issue remains same.
Let me know which permission I am missing here.

Best Answer chosen by abhishek gupta 299
Akshay Dhiman 63Akshay Dhiman 63
Hi Abhishek, 
I have gone through your issue and find some steps which can solve your issue.
You need to change the user for your chatbot. This link will help you in resolving your issue.

Hope this explanation will resolve your query.Mark it as the best answer if you find it helpful.