ame="'.$this->parts[$i]['name']."\"\r\n\r\n";
$message_part.= chunk_split(base64_encode($this->parts[$i]['body']))."\r\n";
}
return $message_part;
}
/***************************************
** builds the multipart message from the
** list ($this->parts).
***************************************/
function build_message(){
$boundary = '=_'.md5(uniqid(time()));
$this->headers.= "mime-version: 1.0\r\n";
$this->headers.= "content-type: multipart/mixed; boundary=\"".$boundary."\"\r\n";
$this->multipart = '';
$this->multipart.= "this is a mime encoded message.\r\ncreated by html_mime_mail.class.\r\nsee http://www.heyes-computing.net/scripts/ for a copy.\r\n\r\n";
if(isset($this->do_html) and $this->do_html == 1) $this->build_html($boundary);
if(isset($this->body) and $this->body != '') $this->parts[] = array('body' => $this->body, 'name' => '', 'c_type' => 'text/plain');
for($i=(count($this->parts)-1); $i>=0; $i--){
$this->multipart.= '--'.$boundary."\r\n".$this->build_part($i);
}
$this->mime = $this->multipart."--".$boundary."--\r\n";
}
/***************************************
** sends the mail.
***************************************/
function send($to_name, &
$message_part.= chunk_split(base64_encode($this->parts[$i]['body']))."\r\n";
}
return $message_part;
}
/***************************************
** builds the multipart message from the
** list ($this->parts).
***************************************/
function build_message(){
$boundary = '=_'.md5(uniqid(time()));
$this->headers.= "mime-version: 1.0\r\n";
$this->headers.= "content-type: multipart/mixed; boundary=\"".$boundary."\"\r\n";
$this->multipart = '';
$this->multipart.= "this is a mime encoded message.\r\ncreated by html_mime_mail.class.\r\nsee http://www.heyes-computing.net/scripts/ for a copy.\r\n\r\n";
if(isset($this->do_html) and $this->do_html == 1) $this->build_html($boundary);
if(isset($this->body) and $this->body != '') $this->parts[] = array('body' => $this->body, 'name' => '', 'c_type' => 'text/plain');
for($i=(count($this->parts)-1); $i>=0; $i--){
$this->multipart.= '--'.$boundary."\r\n".$this->build_part($i);
}
$this->mime = $this->multipart."--".$boundary."--\r\n";
}
/***************************************
** sends the mail.
***************************************/
function send($to_name, &
| 对此文章发表了评论 |
