PHPMailler ile Toplu Mail[YARDIM]
4
●474
- 31-01-2014, 12:39:25Üyeliği durduruldusamsunikinciel adlı üyeden alıntı: mesajı görüntüle
<?php function allposting(){ if($_POST['act']==1){ $subject =$_POST['subject']; $mesaj =stripslashes($_POST['editor1']); $sor=mysql_query("select * from maillistesi order by id desc"); while($maillist=mysql_fetch_assoc($sor)){ require_once("class.phpmailer.php"); $mail = new PHPMailer(); $mail->AddAddress("".$maillist['email'].""); // Buraya hangi mail adresine gideceğiniz yazıyoruz. (veri tabanından geliyor zaten) $mail->AddReplyTo("info@phpbot.net"); $mail->Subject = "".$subject.""; // Mail Konusu $mail->IsSMTP(); $mail->Host = "mail.phpbot.net"; // SMTP sunucu $mail->SMTPAuth = true; $mail->Username = "info@phpbot.net"; // SMTP Kullanıcı adı $mail->Password = "123456"; // SMTP Şifre $mail->IsHTML(true); $mail->From = "info@phpbot.net"; // Mail kimden gidecek. ( Gönderici ) $mail->FromName = "PhpBot.Net"; // Mail gönderen kişinin adı. $Body1 ='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Mail</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body bgcolor="#ffffff"> '.$mesaj.' </body> </html>'; $mail->Body =$Body1; if($mail->Send()){ print $maillist['email']." - Mail gönderildi."; print "<br>"; }else{ print $maillist['email']." - Mail göndertimi başarısız. Lütfen mail ayarlarınızı kontrol ediniz."; print "<br>"; } } }else{ ?> <div class="row"> <div class="col-md-12"> <div class="widget"> <div class="widget-head"> <div class="pull-left">Toplu Mail Gönderme Formu</div> <div class="clearfix"></div> </div> <div class="widget-content"> <div class="padd"> <form action="" method="post" enctype="multipart/form-data"> <input type="hidden" value="1" name="act" /> <fieldset> <div class="form-group"> <label for="name">Mail Konusu </label> <input type="text" name="subject" class="form-control" value="" /></div> <div class="form-group"> <label for="name">Mail İçeriği </label> <textarea class="ckeditor" cols="50" id="editor1" name="editor1" rows="15"> </textarea> </div> <input id="signupuser" type="submit" class="btn btn-primary btn-block" value="Mesajı Gönder"> </fieldset> </form> </div> </div> </div> </div> </div> <?php } }?>
buyrun hocam smtp ile rahatlıkla kullanabilirsiniz
maillerin bulundugu tabloyu kendine göre ayarlarsın
mail adresi mail sunucu vs - 01-02-2014, 20:42:30Üyeliği durdurulduGüle Güle Kullanın Hocam Yardımcı Olabildiysem Ne Mutlusamsunikinciel adlı üyeden alıntı: mesajı görüntüle
Teşekkür ederim dostum.