• <i id='gYY1t'><tr id='gYY1t'><dt id='gYY1t'><q id='gYY1t'><span id='gYY1t'><b id='gYY1t'><form id='gYY1t'><ins id='gYY1t'></ins><ul id='gYY1t'></ul><sub id='gYY1t'></sub></form><legend id='gYY1t'></legend><bdo id='gYY1t'><pre id='gYY1t'><center id='gYY1t'></center></pre></bdo></b><th id='gYY1t'></th></span></q></dt></tr></i><div id='gYY1t'><tfoot id='gYY1t'></tfoot><dl id='gYY1t'><fieldset id='gYY1t'></fieldset></dl></div>

    1. <legend id='gYY1t'><style id='gYY1t'><dir id='gYY1t'><q id='gYY1t'></q></dir></style></legend>

      <tfoot id='gYY1t'></tfoot>

    2. <small id='gYY1t'></small><noframes id='gYY1t'>

        • <bdo id='gYY1t'></bdo><ul id='gYY1t'></ul>

        Zend_Mail 发送的电子邮件被视为垃圾邮件

        时间:2023-10-02
        <legend id='mnRA6'><style id='mnRA6'><dir id='mnRA6'><q id='mnRA6'></q></dir></style></legend>

          <small id='mnRA6'></small><noframes id='mnRA6'>

          <tfoot id='mnRA6'></tfoot>

        • <i id='mnRA6'><tr id='mnRA6'><dt id='mnRA6'><q id='mnRA6'><span id='mnRA6'><b id='mnRA6'><form id='mnRA6'><ins id='mnRA6'></ins><ul id='mnRA6'></ul><sub id='mnRA6'></sub></form><legend id='mnRA6'></legend><bdo id='mnRA6'><pre id='mnRA6'><center id='mnRA6'></center></pre></bdo></b><th id='mnRA6'></th></span></q></dt></tr></i><div id='mnRA6'><tfoot id='mnRA6'></tfoot><dl id='mnRA6'><fieldset id='mnRA6'></fieldset></dl></div>

          • <bdo id='mnRA6'></bdo><ul id='mnRA6'></ul>
              <tbody id='mnRA6'></tbody>

                1. 本文介绍了Zend_Mail 发送的电子邮件被视为垃圾邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  请告诉我我做错了什么.我正在使用 Zend_Mail 类发送电子邮件,如下所示:

                  Please tell me what I am doing wrong. I am sending an email using the Zend_Mail class like this:

                  $message = <<<STR
                  You have a new invoice!
                  
                  Sign in to your clientarea to see it.
                  
                  Best regards,
                  
                  Company name
                  STR;
                  
                  $mail = new Zend_Mail();
                  $mail->setBodyText($message);
                  $mail->setFrom('billing@company.com', 'Company.com');
                  $mail->addTo('client@email.com', 'Client Name');
                  $mail->setSubject('You have a new invoice!');
                  $mail->send();
                  

                  虽然它是作为垃圾邮件接收的.我的服务器上还有其他应用程序,例如 Webmin,它们发送的电子邮件不会被视为垃圾邮件.

                  It is received as a spam though. There are other applications such as Webmin on my server and emails they send is not treated as SPAM.

                  推荐答案

                  我通过添加这些行解决了这个问题:

                  I have solved this by adding these lines:

                  $mail->setReplyTo('contact@company.com', 'Company');
                  $mail->addHeader('MIME-Version', '1.0');
                  $mail->addHeader('Content-Transfer-Encoding', '8bit');
                  $mail->addHeader('X-Mailer:', 'PHP/'.phpversion());
                  

                  关键行似乎添加了 Reply-To 标题.没有它,它总是会进入垃圾邮件.一旦我设置了 Reply-To 标头,电子邮件客户端就停止将其视为垃圾邮件.

                  The critical line seems to be adding Reply-To header. Without that it would always go to SPAM. Once I set the Reply-To header email clients stopped treating it as spam.

                  这篇关于Zend_Mail 发送的电子邮件被视为垃圾邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:使用 Zend Framework 和 PHP 发送电子邮件 下一篇:Zend_Auth 最佳实践

                  相关文章

                  最新文章

                    <bdo id='OD2tZ'></bdo><ul id='OD2tZ'></ul>
                  1. <tfoot id='OD2tZ'></tfoot>
                    <i id='OD2tZ'><tr id='OD2tZ'><dt id='OD2tZ'><q id='OD2tZ'><span id='OD2tZ'><b id='OD2tZ'><form id='OD2tZ'><ins id='OD2tZ'></ins><ul id='OD2tZ'></ul><sub id='OD2tZ'></sub></form><legend id='OD2tZ'></legend><bdo id='OD2tZ'><pre id='OD2tZ'><center id='OD2tZ'></center></pre></bdo></b><th id='OD2tZ'></th></span></q></dt></tr></i><div id='OD2tZ'><tfoot id='OD2tZ'></tfoot><dl id='OD2tZ'><fieldset id='OD2tZ'></fieldset></dl></div>
                    <legend id='OD2tZ'><style id='OD2tZ'><dir id='OD2tZ'><q id='OD2tZ'></q></dir></style></legend>

                      <small id='OD2tZ'></small><noframes id='OD2tZ'>