Implemented this a few years back by abstracting the upstream callbacks. You can mount pretty much any API endpoint as a filesystem with a bit of JavaScript glue. The FUSE layer is in Go: https://github.com/autovia/wfs
It encrypts the message with PGP (client-side) and sends it on to the mail account. A user who does not use PGP can send fairly secure mails to PGP-users. A simple vanity-style URL can be given to such users for easy access to the secure contact form.
If privacy matters use http://owncloud.org same experience like Dropbox with desktop client. Or host your data under the german privacy law like https://owner.io 500 GB for $ 89 per month.