Beispiel #1
0
 public function sendmail()
 {
     global $_K;
     if (!$this->_email || !$this->_username) {
         $userinfo = kekezu::get_user_info($this->_uid);
         $this->_username = $userinfo['username'];
         $this->_email = $userinfo['email'];
     }
     if (!$this->_email) {
         return false;
     }
     $this->_basicconfig and $basicconfig = $this->_basicconfig or $basicconfig = kekezu::get_config('basic');
     if ($basicconfig['mail_server_cat'] == 'mail') {
         if ($basicconfig['post_account'] && $basicconfig['mail_replay'] && $this->_email && $this->_title && $this->_normal_content) {
             $hearer = "From:{$basicconfig['post_account']}\nReply-To:{$basicconfig['mail_replay']}\nX-Mailer: PHP/" . phpversion() . "\nContent-Type:text/html";
             mail($this->_email, $this->_title, htmlspecialchars_decode($this->_normal_content), $hearer);
         }
     } else {
         if ($basicconfig['smtp_url'] && $basicconfig['mail_server_port'] && $basicconfig['post_account'] && $basicconfig['account_pwd'] && $basicconfig['website_name']) {
             kekezu::send_mail($this->_email, $this->_title, htmlspecialchars_decode($this->_normal_content));
         }
     }
 }