Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
protogrid:json_api_endpoint_mailsend [2020-07-24 06:42] – [Example client-side jQuery function to send mail in web application] mhaprotogrid:json_api_endpoint_mailsend [2020-07-28 08:29] – [Example client-side jQuery function to send mail in web application] 85.1.6.98
Line 31: Line 31:
 <code json> <code json>
 { {
-  "errors": [], +   "errors" : [], 
-  "protogrid_environment_version": "1.3.9", +   "protogrid_environment_version" : "2.1.3", 
-  "result": +   "result": {"success":true}
-    "success": "true+
-  ]+
 } }
 </code> </code>
 +
  
 ==== Example client-side jQuery function to send mail in web application ==== ==== Example client-side jQuery function to send mail in web application ====
Line 47: Line 46:
   });   });
      
-$.post("https://example.protogrid.com/api/v2/apps/example/mailsend", +$.post(
-  +    url: "https://example.protogrid.com/api/v2/apps/example/mailsend", 
-    to: "user@example.com", +    data: JSON.stringify(
-    subject: "Test", + "to": "user@example.com", 
-    body: "This%20is%20a%20testmessage", + "cc": "user2@example.com", 
-  }, + "subject": "Test", 
-  function(data, status){ + "body": "This%20is%20a%20testmessage", 
-    alert("Data: " + JSON.stringify(data)); + })
-  });  +    contentType: 'application/json; charset=utf-8' 
 +}).done(function (response) { 
 +        alert("Data: " + JSON.stringify(response)); 
 +});
  
 </code> </code>
Print/export