简体   繁体   English

发送电子邮件给所有用户(所有用户)PHP和MYSQL(每天25,000封邮件)

[英]send email to all subscriber (all user) PHP & MYSQL (25,000 mail per day)

I have a website where I have put a subscriber page. 我有一个放置订户页面的网站。 And subscribers details like email and name is stored in mysql DB. 订户详细信息(例如电子邮件和姓名)存储在mysql DB中。

Lets say, I have 1000 subscribed users in mysql database. 可以说,我在MySQL数据库中有1000个订阅用户。 If I want to send an email to all users, what should i do? 如果我想向所有用户发送电子邮件,该怎么办? mail shouldn't go in SPAM 邮件不应该进入垃圾邮件

please tell me any tutorial or website TO DO 请告诉我任何教程或网站

First please consult your favourite search engine. 首先,请咨询您喜欢的搜索引擎。

Anyway here's a tutorial: http://woork.blogspot.de/2008/01/simple-newsletter-system-using-php.html?m=1 无论如何,这是一个教程: http ://woork.blogspot.de/2008/01/simple-newsletter-system-using-php.html?m =1

You should consider to take a look at php's MySQL and mail functionalities though. 您应该考虑一下php的MySQL和邮件功能。

here you can find a newsletter script I made & updating it: http://speedosoftwares.tk/showthread.php?tid=12&pid=16#pid16 在这里,您可以找到我制作并更新的新闻稿脚本: http : //speedosoftwares.tk/showthread.php?tid=12 &pid=16# pid16

here is a code to loop through the email 这是循环遍历电子邮件的代码

                    $mailToList = array();
                    $getEmails = $consite->runQuery("SELECT * FROM `mail_list`");
                    if($getEmails->rowCount() != 0) {
                        while($row_info = $getEmails->fetch(PDO::FETCH_ASSOC)) {
                            $emails = $row_info['email'];
                            array_push($mailToList,$emails);
                        }
                        foreach($mailToList as $wmEmail){
                            mail($wmEmail,$subject,$content."\r\n\r\nUnsubscribe by going to: url.tld",$headerss);
                            echo('Mail sent to: '.$wmEmail.'<br />');
                        }
                        $message = 'Successfully sent the Email(s)!';
                    }else{
                        $message = 'Email failed to be sent, None emails are found!';
                    }

edit: this is used in my script it will echo each email account it's sent to also a must know 编辑:这在我的脚本中使用,它将回显发送到的每个电子邮件帐户,也必须知道

ALWAYS ADD AN UNSUBSCRIBE LINK else you're going to ignore a legal fact for "spam mail" 总是添加一个取消订阅的链接,否则您将忽略“垃圾邮件”的法律事实

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM