久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <bdo id='r17Ly'></bdo><ul id='r17Ly'></ul>

  1. <small id='r17Ly'></small><noframes id='r17Ly'>

  2. <tfoot id='r17Ly'></tfoot>

    1. <legend id='r17Ly'><style id='r17Ly'><dir id='r17Ly'><q id='r17Ly'></q></dir></style></legend>
      <i id='r17Ly'><tr id='r17Ly'><dt id='r17Ly'><q id='r17Ly'><span id='r17Ly'><b id='r17Ly'><form id='r17Ly'><ins id='r17Ly'></ins><ul id='r17Ly'></ul><sub id='r17Ly'></sub></form><legend id='r17Ly'></legend><bdo id='r17Ly'><pre id='r17Ly'><center id='r17Ly'></center></pre></bdo></b><th id='r17Ly'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='r17Ly'><tfoot id='r17Ly'></tfoot><dl id='r17Ly'><fieldset id='r17Ly'></fieldset></dl></div>
    2. 從 Zend Framework 應(yīng)用程序向數(shù)百個收件人發(fā)送電子

      What#39;s the best approach to sending email to hundreds of recipients from a Zend Framework application?(從 Zend Framework 應(yīng)用程序向數(shù)百個收件人發(fā)送電子郵件的最佳方法是什么?) - IT屋-程序員軟件開發(fā)技術(shù)分享

      • <legend id='2LpUh'><style id='2LpUh'><dir id='2LpUh'><q id='2LpUh'></q></dir></style></legend>
        • <bdo id='2LpUh'></bdo><ul id='2LpUh'></ul>
          <tfoot id='2LpUh'></tfoot>
          • <i id='2LpUh'><tr id='2LpUh'><dt id='2LpUh'><q id='2LpUh'><span id='2LpUh'><b id='2LpUh'><form id='2LpUh'><ins id='2LpUh'></ins><ul id='2LpUh'></ul><sub id='2LpUh'></sub></form><legend id='2LpUh'></legend><bdo id='2LpUh'><pre id='2LpUh'><center id='2LpUh'></center></pre></bdo></b><th id='2LpUh'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='2LpUh'><tfoot id='2LpUh'></tfoot><dl id='2LpUh'><fieldset id='2LpUh'></fieldset></dl></div>

            <small id='2LpUh'></small><noframes id='2LpUh'>

                  <tbody id='2LpUh'></tbody>
                本文介紹了從 Zend Framework 應(yīng)用程序向數(shù)百個收件人發(fā)送電子郵件的最佳方法是什么?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                我正在嘗試為我的應(yīng)用程序?qū)崿F(xiàn)一個郵件列表系統(tǒng).我目前使用 Zend_Mail_Transport_Smtp('localhost') 作為我的傳輸,循環(huán)瀏覽我的訂閱者列表,并向每個訂閱者發(fā)送一個新的 Zend_Mail.但是,我注意到腳本完成所需的時間隨著訂閱者數(shù)量的增加而增加.

                I'm trying to implement a mailing list system for my application. I'm currently using Zend_Mail_Transport_Smtp('localhost') as my transport, looping through my list of subscribers, and sending a new Zend_Mail to each one. However, I am noticing that the length of time that it takes for the script to complete increases as the number of subscribers increase.

                我相信一定有更專業(yè)的方法來做到這一點(diǎn),包括電子郵件排隊(duì).我想最理想的方法是讓用戶填寫表單,點(diǎn)擊發(fā)送,然后立即得到回復(fù)說正在發(fā)送電子郵件,而不是等待數(shù)百封電子郵件發(fā)送完畢.

                I'm sure there must be a more professional approach to doing this, involving the queuing of emails. I suppose the ideal approach would be for the user to fill out the form, click send, and immediately get a response saying that the emails are being sent, rather than waiting for the hundreds of emails to finish sending.

                我知道 Zend_Mail 不做任何排序郵件排隊(duì).任何有這方面經(jīng)驗(yàn)的人都可以給我一個關(guān)于如何做到這一點(diǎn)的概述嗎?我對 cron/crontab/cronjobs 一無所知,所以如果涉及到,請解釋一下過程.

                I understand that Zend_Mail does not do any sort mail queuing. Could anyone who has experience with this, give me an overview of how this can be done? I don't know anything about cron/crontab/cronjobs, so if it involves that, please explain the process.

                推薦答案

                為了使用 PHP 可靠地發(fā)送大量電子郵件,您必須使用排隊(duì)機(jī)制.正如其他人所建議的,使用隊(duì)列的過程如下所示:

                In order to reliably send a large number of emails using PHP you have to use a queueing mechanism. As suggested by others, the process of using a queue looks something like this:

                • 遍歷您的一組用戶,為每個用戶創(chuàng)建電子郵件并可能自定義內(nèi)容
                • 將每個郵件對象傳遞到隊(duì)列,這將延遲發(fā)送電子郵件
                • 在某種 cron 腳本中,一次發(fā)送數(shù)百個隊(duì)列內(nèi)容.注意:您需要通過查看日志以查看實(shí)際發(fā)送過程中返回的錯誤來調(diào)整發(fā)送的電子郵件數(shù)量.如果您嘗試發(fā)送太多郵件,我已經(jīng)注意到郵件傳輸將不再接受連接(我使用的是 qmail)

                您可以使用一些庫來執(zhí)行此操作,PEAR 郵件隊(duì)列(使用 Mail_Mime)和 SwiftMailer 都允許您創(chuàng)建和排隊(duì)電子郵件.到目前為止,Zend Mail 只提供電子郵件的創(chuàng)建,不提供排隊(duì)(稍后會詳細(xì)介紹).

                There are a few libraries out there you can use to do this, PEAR Mail Queue (with Mail_Mime) and SwiftMailer both allow you to create and queue emails. So far, Zend Mail only provides for creation of emails, not queueing (more on that later).

                我主要有使用 PEAR 郵件隊(duì)列 的經(jīng)驗(yàn),但有一些問題.如果您嘗試將大量電子郵件排隊(duì)(例如,循環(huán)超過 20,000 個用戶并嘗試在合理的時間內(nèi)將他們放入隊(duì)列),則使用 Mail Mime 的帶引號的可打印編碼實(shí)現(xiàn)非常慢.您可以通過切換到 base64 編碼來加快速度.

                I have experience primarily with PEAR Mail Queue and there are a few gotchas. If you are trying to queue up a large number of emails (for instance, looping over 20,000 users and trying to get them into the queue in a reasonable time), using Mail Mime's quoted-printable encoding implementation is very slow. You can speed this up by switching to base64 encoding.

                對于 Zend Mail,您可以編寫一個 Zend Mail Transport 對象,將您的 Zend Mail 對象放入 PEAR 郵件隊(duì)列.我已經(jīng)取得了一些成功,但需要花點(diǎn)時間才能做到正確.為此,請擴(kuò)展 Zend Mail Transport Abstract,實(shí)現(xiàn) _sendMail 方法(您將在該方法中將 Zend Mail 對象放入郵件隊(duì)列)并將傳輸對象的實(shí)例傳遞給 Zend Mail 對象的 send() 方法或通過 Zend Mail::setDefaultTransport().

                As for Zend Mail, you can write a Zend Mail Transport object that puts your Zend Mail objects into the PEAR Mail Queue. I have done this with some success, but it takes a bit of playing to get it right. To do this, extend Zend Mail Transport Abstract, implement the _sendMail method (which is where you will drop your Zend Mail object into the Mail Queue) and pass the instance of your transport object to the send() method of your Zend Mail object or by Zend Mail::setDefaultTransport().

                最重要的是,您可以通過多種方式做到這一點(diǎn),但這需要您進(jìn)行一些研究和學(xué)習(xí).然而,這是一個非常容易解決的問題.

                Bottom line is that there are many ways you can do this, but it will take some research and learning on your behalf. It is a very solvable problem, however.

                這篇關(guān)于從 Zend Framework 應(yīng)用程序向數(shù)百個收件人發(fā)送電子郵件的最佳方法是什么?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標(biāo)不起作用)
                PHP PDO ODBC connection(PHP PDO ODBC 連接)
                Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術(shù)方法)
                php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動程序)

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

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

                      • <legend id='Xtz24'><style id='Xtz24'><dir id='Xtz24'><q id='Xtz24'></q></dir></style></legend>
                          <tbody id='Xtz24'></tbody>

                          主站蜘蛛池模板: 最近中文字幕在线视频1 | 欧洲成人 | 欧美成人精品一区二区男人看 | 99reav| 天堂精品 | 亚洲国产成人精品在线 | 免费午夜电影 | 久久不卡 | 欧美日韩久久久 | 在线一区视频 | 天堂久久天堂综合色 | 国产精品国产精品国产专区不片 | 免费久草 | 精品伊人久久 | 亚洲精品视频在线播放 | 伦理午夜电影免费观看 | 色综合激情 | 亚洲视频在线一区 | 欧美日本亚洲 | 欧美区在线观看 | 黄色毛片免费看 | 日韩一区二区三区四区五区 | 久久蜜桃av一区二区天堂 | 在线中文视频 | 亚洲欧美另类在线观看 | 日韩av免费在线观看 | 亚洲一区二区三区视频 | 国内精品视频一区二区三区 | 999精品视频在线观看 | 中文字幕一区二区三区乱码在线 | 日韩快播电影 | 天天曰天天干 | 男女羞羞视频在线看 | 欧美精品欧美精品系列 | 狠狠狠 | 人人色视频 | 久久成人18免费网站 | av毛片在线免费观看 | 狠狠狠色丁香婷婷综合久久五月 | 91精品国产高清一区二区三区 | 亚洲视频免费在线看 |