ckground.gif';
$backgrnd = fread($fp = fopen($filename, 'r'), filesize($filename));
fclose($fp);
$text = 'this is a test.';
$html = '<html><body background="background.gif"><font face="verdana, arial" color="#ff0000"> success!</font><p></body></html>';
$mail->add_html_image($backgrnd, 'background.gif', 'image/gif');
$mail->add_html($html, $text);
-------------------------------------------------------------------------------------*/
//读取正文,将信件封装并发送
$mail->body=$bodytext;
$mail->build_message();
$backvalue=$mail->send(' ',$receivemailbox,' ',$sendmailbox,$subject,' ');
//发送提示信息
echo "<script language=javascript>alert('发信ok,按确定返回!');window.location='default.htm'</script>";
}
else{ //如果不带附件
$backvalue=mail($receivemailbox,$subject,$bodytext,"from:" . $sendmailbox . "\nreply-to:" . $sendmailbox . "\nx-mailer: php/" . phpversion());
if ($result) {
echo "<script language=javascript>alert('发信ok,按确定返回!');window.location='default.htm'</script>";
}
else{
echo "<script language=javascript>backvalue=window.confirm('发信失败!可能是服务器太忙!是否要重发?');if(backvalue){location.reload()}else{window.location='default.htm'}</script>";
}
}
?>
$backgrnd = fread($fp = fopen($filename, 'r'), filesize($filename));
fclose($fp);
$text = 'this is a test.';
$html = '<html><body background="background.gif"><font face="verdana, arial" color="#ff0000"> success!</font><p></body></html>';
$mail->add_html_image($backgrnd, 'background.gif', 'image/gif');
$mail->add_html($html, $text);
-------------------------------------------------------------------------------------*/
//读取正文,将信件封装并发送
$mail->body=$bodytext;
$mail->build_message();
$backvalue=$mail->send(' ',$receivemailbox,' ',$sendmailbox,$subject,' ');
//发送提示信息
echo "<script language=javascript>alert('发信ok,按确定返回!');window.location='default.htm'</script>";
}
else{ //如果不带附件
$backvalue=mail($receivemailbox,$subject,$bodytext,"from:" . $sendmailbox . "\nreply-to:" . $sendmailbox . "\nx-mailer: php/" . phpversion());
if ($result) {
echo "<script language=javascript>alert('发信ok,按确定返回!');window.location='default.htm'</script>";
}
else{
echo "<script language=javascript>backvalue=window.confirm('发信失败!可能是服务器太忙!是否要重发?');if(backvalue){location.reload()}else{window.location='default.htm'}</script>";
}
}
?>
| 对此文章发表了评论 |
