<?php
/*********************************************************
程序名称：站长助手 WEBMASTER HELPER
作者：feixin
email:kusite@etang.com
版权：feixin (http://www.zc18.com)
//////////////////////////////////////////////////////////

最后编辑日期：2003-6-12
*********************************************************/

if (!defined('IN_WH')) {
  die("不要黑我啊");
}

include_once("./include/email.php");

if($email_re[txtorhtml]){
	$content = $WHuds->read("./include/email_html.tpl");
	$message = $WH->tpl_m($content);
}else{
	$content = $WHuds->read("./include/email_text.tpl");
	$message = $WH->tpl_m($content);
}

$WHmail = new WHmail("{$email_fa[email]}", "{$email_re[email]}", "{$email_re[subject]}");
if($email_re[txtorhtml]){
	$WHmail->attach($message, "", HTML, BASE64);
}else{
	$WHmail->attach($message, "", TEXT, QP);
}

if($WHmail->send_mail()){
	$WH->message("成功发送email给{$email_re[email]}！", "index.php?op=email");
}else{
	$WH->message("发送email失败！", "index.php?op=email");
}

?>