用fsockopen发送多个消息 – 最后的消息不会出去
在PHP中,我写了一个相对简单的邮件传递脚本。 这是实际交付部分: private function SendMail($to, $subj) { if(!$this->smtp) { $this->OpenSMTPSock(); } fwrite($this->smtp, "MAIL FROM:<[email protected]>\r\n"); fwrite($this->smtp, "RCPT TO:<$to>\r\n"); fwrite($this->smtp, "DATA\r\n"); fwrite($this->smtp, "Received: from email.com by domain.com ; ".date("r")."\r\n"); fwrite($this->smtp, "Date: ".date("r")."\r\n"); fwrite($this->smtp, "From: ".$this->message["display_name"]." <[email protected]>\r\n"); fwrite($this->smtp, "Reply-to: ".$this->message["reply"]."\r\n"); fwrite($this->smtp, "Subject: $subj\r\n"); fwrite($this->smtp, "To: $to\r\n"); if($this->message["type"] == "H") { fwrite($this->smtp, "content-type: text/html; charset=`iso-8859-1`"); fwrite($this->smtp, "\r\n".$this->m_html."\r\n"); } if($this->message["type"] […]