background image

return $this->attach;
}

public function setTopic($topic) {
$this->topic = mb_convert_encoding(trim($topic),'UTF-8','auto');
}
public function setToaddr($toaddr) {
$this->toaddr = trim($toaddr);
}

public function setCc($cc) {
$this->cc = trim($cc);
}

public function setContent($content) {
$this->content = mb_convert_encoding(trim($content),'UTF-8','auto');
}

public function setAttach($attach) {
$this->attach = trim($attach);
}
public function getDomain() {
return $this->domain;
}
public function setDomain($domain) {
$this->domain = $domain;//输入的值为'@domain.com'
}

/*
* 根据系统类型设置换行符
*/
private function getEOT() {
if (strtoupper ( substr ( PHP_OS, 0, 3 ) == 'WIN' )) {
$this->eol = "rn";
} elseif (strtoupper ( substr ( PHP_OS, 0, 3 ) == 'MAC' )) {
$this->eol= "r";
} else {
$this->eol = "n";
}
}

private function getBoundary(){
$this->boundary= '--'.substr(md5(time().rand(1000,2000)),0,16);
}