I don't think it would be possible without a VPS or dedicated server and even then it may not be easy because cPanel changes the way their system functions pretty regularly.

They do not have any email options yet for their XML API and that would be the closest thing to use if they had such a function because your script may work today, but not tomorrow if they decide to change the way email accounts work. Without an API call it might be difficult to maintain.

You might put in a feature request on their bugzilla to see if it could be added.

cPanel - The Leading Control Panel