月光
看我代替月亮懲罰你!
|
分享:
▲
▼
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 |
|
|
|