You really don't want to let users archive their own email. It's far better that you use the server to store mail. after all HD space is inexpensive. If you really want to script the archiving of email then you might want to look at the
REST interface.