2015-10-16 45 views
-1

如果我想將郵件通知發送給成千上萬的用戶同時存儲在我的數據庫中,使用簡單的數據庫查詢來獲取郵件必須的必需用戶被髮送,然後同時發送郵件給所有人都會花費很多時間,那麼在最短的時間內怎麼做纔是最好的方式?在最短時間內同時向大量用戶發送郵件

+1

您可能希望使用帶有API的提供者來實現此特殊目的,例如, [Mailchimp](http://mailchimp.com) – Jan

回答

0
This Solution may help you.... 

    (1) SET A Cron JOB For Sending E-Mail & Also Maintain a Flag For Those Persons which have you sent the mail. 
    (2) Also Use Ajax API Whicxh will Notify you regarding sent E-mails. 

    (3)Steps : How To Run PHP Script For Using Cron JOB 

    Method 1: Execute the script using php from the crontab 
    To execute myscript.php every 1 hour do the following: 
    # crontab -e 
    00 * * * * /usr/local/bin/php /home/john/myscript.php 

    Method 2: Run the php script using URL from the crontab 

    00 * * * * lynx -dump http://www.thegeekstuff.com/myscript.php 

    The following script executes the php script (every 5 minutes) by calling the URL using CURL. Curl by default displays the output in the standard output. Using the 「curl -o」 option, you can also dump the output of your script to a temporary file as shown below. 

    */5 * * * * /usr/bin/curl -o temp.txt http://www.thegeekstuff.com/myscript.php 

Now You Can Implement Your Code Easily... 
相關問題