*/
require_once 'php-gpg/libs/GPG.php';
function securemail_install() {
register_hook('plugin_settings', 'addon/securemail/securemail.php', 'securemail_settings');
register_hook('plugin_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
register_hook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
logger("installed securemail");
}
function securemail_uninstall() {
unregister_hook('plugin_settings', 'addon/securemail/securemail.php', 'securemail_settings');
unregister_hook('plugin_settings_post', 'addon/securemail/securemail.php', 'securemail_settings_post');
unregister_hook('emailer_send_prepare', 'addon/securemail/securemail.php', 'securemail_emailer_send_prepare');
logger("removed securemail");
}
function securemail_settings(&$a,&$s){
if(! local_user())
return;
$enable_checked = (intval(get_pconfig(local_user(),'securemail','enable')) ? ' checked="checked"' : '');
$publickey = get_pconfig(local_user(),'securemail','pkey');
# all of this should be in a template...
$s .= '';
$s .= '' . t('"Secure Mail" Settings').'
';
$s .= '';
$s .= '