title = __("mail", "dagsopt"); $this->pluginname = $ns->pluginname; $this->file = $ns->file; $this->ns = $ns; } function start() { $this->logfile = fopen(ABSPATH . "/wp-content/uploads/maillog.log", 'a'); add_filter('wp_mail', array(&$this, 'mail_logger'), 10, 1); } function mail_logger($args) { $str = date("Y-m-d"); $str .= " | " . date("H:i:s"); $str .= " | " . $args['to']; $str .= " | " . $args['subject']; fwrite($this->logfile, $str . "\n"); return $args; } function help() { ?>
dagsopt['plug_mail'] = $plug_mail; }