Deluge script to add Mail Task

Deluge script to add Mail Task

Has anyone out there created a custom function to create a Zoho Mail task?  I'd be interested in hearing how you accomplished it.  Sample code is appreciated!