Commit forked and adjusted version of email plugin.