//********Send mail
function sendmail(){
mail("to:******","****title***","$messages","From:[email protected]\nReply-To:[email protected]\nX-Mailer: php\nErrors-To:$from_email_address");
}其中$messages为你为表单内容制作的版面
function sendmail(){
mail("to:******","****title***","$messages","From:[email protected]\nReply-To:[email protected]\nX-Mailer: php\nErrors-To:$from_email_address");
}其中$messages为你为表单内容制作的版面
解决方案 »
- 求教一道简单的数组算法
- 用php写了段输出图象的程序,如何把以下程序加进去,使得客户端的用户点击下图触发执行呢,跪求
- 能否自动输入网络密码?
- 推荐几个优秀的源码下载站点,有好的一起顶!
- PHPLib的安装使用问题,大家指点一下
- 跳转页面之后如果选择后退怎么办?
- 如果我发送一封html格式的邮件到指定的邮箱中,我如何能知道他是否已经读过这封邮件呢?
- 怎么解决这样的错误--"Database Connect Error! Retry!"?
- 请教插入中文到MYSQL,但phpmyadmin却显示空白,该怎么办?
- phpredis问题
- 论坛中的转到功能
- 一个类里的函数要用到另外一个类的函数应该怎么调用?
Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()...
<?
function mymail($mto,$mcc,$msubject,$mbody)
{
$from = "[email protected]";
$sign = "\n";//随你便写些什么
$sendmailpath = "/usr/lib/sendmail";//Semdmail路径
$bound = "========_".uniqid("BCFMail")."==_";//分界符
$headers = "MIME-Version: 1.0\n".
"Content-Type: multipart/mixed; boundary=\"$bound\"\n".
"Date: ".date("D, d M H:i:s Y ")."\n".
"From: $from\n".
"To: $mto\n".
"Cc: $mcc\n".
"Subject: $msubject\n".
"Status: \n".
"X-Status:\n".
"X-Mailer: MY Email Interface\n".
"X-Keywords:\n\n";
$content="--".$bound."\n"."Content-Type:text/plain;charset=\"GB2312\"\n\n".$mbody.$sign."\n";
$end = "\n"."--".$bound."--\n";
$sock = popen("$sendmailpath -t -f '[email protected]'",'w');
fputs($sock, $headers);
fputs($sock, $content);
fputs($sock, $end);
fputs($sock, ".\n");
fputs($sock, "QUIT\n");
pclose($sock);
} mymail("[email protected]", "[email protected]", "test", "test");//backhome.com.cn
?>