How to send mail with js SDK

How to send mail with js SDK

Hell
o

I'm using https://live.zwidgets.com/js-sdk/1.2/ZohoEmbededAppSDK.min.js, for my widget in CRM (built with sigma)
Is it possible to send email from js file, I try ti use that
  1. ZOHO.CRM.API.sendMail({
  2. "Entity": "Accounts",
  3. "RecordID": sharedVariableEntityId,
  4. "APIData": {
  5. "data": [
  6. {
  7. "from": { "user_name": "jak", "email": "my email" },
  8. "to": [{ "user_name": "User", "email": "another email }],
  9. "subject": "test",
  10. "content": "Hi User,\n\nWelcome to Platform Testing..\n\nThanks,\njak",
  11. "mail_format": "text",
  12. "paper_type": "USLetter",
  13. "view_type": "portrait",
  14. "org_email": false
  15. }
  16. ]
  17. }
  18. }).then(function(successResponse) {
  19. console.log('response : SUCCESS EMAIL');
  20. }, function(errorResponse) {
  21. console.log('response : ERROR EMAIL');
  22. });
It doesn't it sees that method is undefined

any solutions ?
Thanks