看板 PHP 關於我們 聯絡資訊
我的系統是iis+php php.ini裡的sendmail_from為[email protected] 用mail function寄信到hotmail都會被丟到垃圾信夾裡面,主要程式如下: $boundary = uniqid('np'); $headers = "MIME-Version: 1.0\r\n"; $headers .= "From: 貝殼魚工作室 <[email protected]>\r\n"; $headers .= "Subject: Test mail\r\n"; $headers .= "Content-Type: multipart/alternative;boundary=" . $boundary . "\r\n"; $message = "This is a MIME encoded message."; $message .= "\r\n\r\n--" . $boundary . "\r\n"; $message .= "Content-type: text/plain;charset=utf-8\r\n\r\n"; $message .= "This is the text/plain version."; $message .= "\r\n\r\n--" . $boundary . "\r\n"; $message .= "Content-type: text/html;charset=utf-8\r\n\r\n"; $message .= "This is the <b>text/html</b> version."; $message .= "\r\n\r\n--" . $boundary . "--"; mail($to, $subject, $message, $headers); -------------------------------------------------------------- Google了一些解決方法,發現似乎跟我的主機IP有關。 我的主機IP是220.134.189.68 在這個外國網站檢查似乎這個ip裡列為特別名單以致信都會被列為垃圾 http://www.spamhaus.org/lookup.lasso 這個網站也提供表單讓人把ip從特別名單刪除的方法 http://www.spamhaus.org/pbl/query/PBL111452 而它的表單有要我填寫個人信箱的欄位、但不能是免費的位箱 而我目前所有的信箱都是免費的,包括gmail、hotmail、yahoo,以致無法送出該表單 所以問題也還沒得到解決。 =================================================================== 請問有沒有方法可以讓mail不要被丟到垃圾信夾的? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.134.189.68
superpai:用google smtp 11/24 21:49
backfish:自己解答,用phpmailer搭配gmail的設定,ok 11/24 22:20