月光
看我代替月亮惩罚你!
|
分享:
▲
▼
Re:
下面是引用chialewang于2008-08-17 19:10发表的 : 测试过了,用yahoo的信箱当站内发信也是,所以的确是yahoo的问题 =.= gmail也是 而我的xxoo.to,会变为简体、垃圾邮件
晕倒
感谢两位前辈的指点 今天我针对这问题去研究了一下发现PHPWIND 6.0以下的版本 使用 mail 函数发送 时 sendemail.php 并没有标示utf-8因此...是乱码经过参考6.3版本的 sendemail.php 只要把原本的 复制程式
if($M_db->S_method == 1){
if(@mail($toemail,$send_subject,$send_message,$additional)){
return true;
} else{
return false;
} 修改为 复制程式
$subject = stripslashes($subject);
$message = stripslashes($message);
$send_subject = "=?$db_charset?B?".base64_encode(str_replace(array("\r","\n"), array('',' '),$subject)).'?=';
$send_message = chunk_split(base64_encode(str_replace("\r\n.", " \r\n..", str_replace("\n", "\r\n", str_replace("\r", "\n", str_replace("\r\n", "\n", str_replace("\n\r", "\r", $message)))))));
$send_from = "=?$db_charset?B?".base64_encode($windid)."?= <$fromemail>";
$send_to = "=?$db_charset?B?".base64_encode($sendtoname)."?= <$toemail>";
substr(str_replace(array("\r","\n"),array('','<rn>'),$additional),-4) != '<rn>' && $additional .= "\r\n";
$additional = "To: $send_to\r\nFrom: $send_from\r\nMIME-Version: 1.0\r\nContent-type: text/plain; charset=$db_charset\r\n{$additional}Content-Transfer-Encoding: base64\r\n";
if($M_db->S_method == 1){
if(@mail($toemail,$send_subject,$send_message,$additional)){
return true;
} else{
return false;
} 就好了
|
|
x1
[6 楼]
From:台湾中华电信HINET | Posted:2008-09-02 03:03 |
|
|
chialewang
|
分享:
▲
▼
感恩
抱歉回覆的晚,没有您说的那一大段耶
全详文
<?php require_once('global.php'); require_once(R_P.'require/header.php');
$groupid=='guest' && Showmsg('not_login'); InitGP(array('action')); !$action && $action='mailto';
list(,,,,$othergd)=explode("\t",$db_gdcheck);
if($action == 'mailto'){ InitGP(array('uid','username')); if($username || is_numeric($uid)){ if($username){ $sql="username='".addslashes($username)."'"; } else{ $sql="uid='$uid'"; } $userdb=$db->get_one("SELECT uid,username,email,publicmail,receivemail FROM pw_members WHERE $sql"); } else{ $userdb=''; } !$userdb && Showmsg('undefined_action'); $rt = $db->get_one("SELECT lasttime FROM pw_memberinfo WHERE uid='$winduid'"); if($timestamp-$rt['lasttime'] < 60){ Showmsg('sendeamil_limit'); } if(!$_POST['step']){ if(!$userdb['receivemail'] && $groupid!='3' && $groupid!='4'){ Showmsg('sendeamil_refused'); } $to_mail = $userdb['email']; $to_user = $userdb['username'];
if($userdb['publicmail']!=1 && $groupid!='3' && $groupid!='4'){ $hiddenmail=1; } else { $hiddenmail=0; } require_once(PrintEot('sendmail'));footer(); } else { $othergd && GdConfirm($_POST['gdcode']);
if(!$userdb['receivemail'] && $groupid!='3' && $groupid!='4'){ Showmsg('sendeamil_refused'); } $sendtoemail = $userdb['email']; InitGP(array('subject','atc_content','fromname','fromemail','sendtoname'));
if(empty($subject)){ Showmsg('sendeamil_subject_limit'); } if(empty($atc_content) || strlen($atc_content)<=20){ Showmsg('sendeamil_content_limit'); } elseif (!ereg("^[-a-zA-Z0-9_\.]+\@([0-9A-Za-z][0-9A-Za-z-]+\.)+[A-Za-z]{2,5}$",$sendtoemail) || !ereg("^[-a-zA-Z0-9_\.]+\@([0-9A-Za-z][0-9A-Za-z-]+\.)+[A-Za-z]{2,5}$",$fromemail)){ Showmsg('illegal_email'); } if($rt){ $db->update("UPDATE pw_memberinfo SET lasttime='$timestamp' WHERE uid='$winduid'"); } else{ $db->update("INSERT INTO pw_memberinfo (uid,lasttime) VALUES('$winduid','$timestamp')"); } require_once(R_P.'require/sendemail.php');
if(sendemail($sendtoemail,$subject,$atc_content,'email_additional')){ refreshto('index.php','mail_success'); } else{ Showmsg('mail_failed'); } } } ?>
[ 此文章被chialewang在2008-11-04 20:26重新编辑 ]
|
王嘉乐命理研究中心 服务电话:(06)350-4315 优惠活动: http://54.xxoo.to/read.php?tid=8
|
x0
[7 楼]
From: | Posted:2008-11-03 22:46 |
|
|
|