php电子邮件发送到gmail但不发送到outlook或rediffmail

时间:2016-08-25 18:29:50

标签: php email outlook

我在php电子邮件中面临一个问题。我在电子邮件中发送了多个附件,并且使用gmail工作正常,但我无法在Outlook或rediffmail中接收电子邮件

我的电子邮件地址:

$header = "From: Futureshirts <designImages@futureshirts.com>\r\n";
    $header .= "Reply-To: noreply@futureshirts.com\n";
    $header .= "MIME-Version: 1.0\n";
    $header .= "Content-Type: multipart/mixed; boundary=\"".$uid."\"\n\n";
    $emessage= "--".$uid."\n";
    // attachments
    foreach ($imgArr as $key => $file) {
        $content = file_get_contents($file);
        $content = chunk_split(base64_encode($content));
        $fileToExp = $file;
        $value = explode("/", $fileToExp);
        $fileName = strtolower(array_pop($value));   //Line 32
        $emessage.= "Content-type:text/plain; charset=iso-8859-1\n";
        $emessage.= "Content-Transfer-Encoding: 7bit\n\n";
        $emessage .= $message."\n\n";
        $emessage.= "--".$uid."\n";
        $emessage .= "Content-Type: application/octet-stream; name=\"".$fileName."\"\n";
        $emessage .= "Content-Transfer-Encoding: base64\n";
        $emessage .= "Content-Disposition: attachment; filename=\"".$fileName."\"\n\n";
        $emessage .= $content."\n\n";
        $emessage .= "--".$uid."--";
        //unlink($file);
    }
    //SEND Mail
     mail($mailto, $subject, $emessage, $header);

0 个答案:

没有答案