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
- ZOHO.CRM.API.sendMail({
- "Entity": "Accounts",
- "RecordID": sharedVariableEntityId,
- "APIData": {
- "data": [
- {
- "from": { "user_name": "jak", "email": "my email" },
- "to": [{ "user_name": "User", "email": "another email }],
- "subject": "test",
- "content": "Hi User,\n\nWelcome to Platform Testing..\n\nThanks,\njak",
- "mail_format": "text",
- "paper_type": "USLetter",
- "view_type": "portrait",
- "org_email": false
- }
- ]
- }
- }).then(function(successResponse) {
- console.log('response : SUCCESS EMAIL');
- }, function(errorResponse) {
- console.log('response : ERROR EMAIL');
- });
It doesn't it sees that method is undefined
any solutions ?
Thanks