السلام عليكم ورحمة الله وبركاته
هذا كود القائمة البريدية
سؤالي اريد عنوان المرسل قبل فتح الرسالة يكون مثلا البرمجة
وهذا يعمل مع الهوتميل
اما الياهو فيكون العنوان
البرمجة @yahoo.com
فكيف يمكنني ازالة
@yahoo.com
ولكم جزيل الشكر
<?php
$tmpl->readTemplatesFromFile("send_mail.html");
$content="send_mail";
$menu = "MENU6";
if(!empty($_POST) != false){
// Get Pos vars
$message_title = stripslashes($_POST['message_title']);
$subject = "Al Aaqeel >> Mailing List >> [ New Message ]";
$message = $_POST['message'];
$all_message = '<div role="main" class="undoreset clearfix" style="overflow: visible; visibility: visible;">
<div id="yiv2029361110">
<table cellspacing="0" cellpadding="0" border="0" width="600">
<tbody><tr>
<td>
<table cellspacing="0" cellpadding="0" border="0" background="http://images.hi5.com/images/email/notice2_02.jpg" width="600">
<tbody><tr>
<td height="9" width="600" colspan="2"><img height="9" width="600" alt="" src="http://images.hi5.com/images/email/notice2_01.jpg"/></td>
</tr>
<tr>
<td width="458" style="padding: 10px 20px; font-family: Verdana; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(33, 33, 33); text-align: left;">
<span style="font-weight: bold; font-size: 22px; color: rgb(99, 135, 175);">
Alaqeel <a href="http://www.alaqeel.com.sa/index.php"><div style="color:gray;">www.alaqeel.com.sa</div></a> </span>
<span style="font-weight: 700; font-size: 14px; color: #6387AF"> '.$message_title.' </span><br/><br/>
Message Text :<br/><br/>
'.$message.'<p><hr></p>
<p><br/><br/>
مع أطيب الأمنيات
<br/>
<br/>
</td>
<td width="142">
<table cellspacing="0" cellpadding="0" border="0" align="center" width="100">
<tbody><tr>
<td align="center">
<img border="0" src="http://www.drkhaled.info/mail.gif" width="113" height="103"></td>
</tr>
</tbody></table>
</td>
</tr>
<tr>
<td height="9" width="600" colspan="2"><img height="9" width="600" alt="" src="http://images.hi5.com/images/email/notice2_03.jpg"/></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</div></div>';
$error = '';
if(empty($message_title)){
$error .= ' <b>من فضلك قم بادخال عنوان الرسالة .</b><br />';
}
if(empty($message)){
$error .= ' <b>من فضلك قم بادخال نص الرسالة التى تود ارسالها .</b><br />';
}
if(!$error){
$query ="SELECT * FROM `mail_list`";
$rows = mysql_query($query) or die(mysql_error());
$from = "البرمجة";
$sender = "البرمجة";
$email = "البرمجة";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
$headers .= "From:<البرمجة>\r\n";
$count = 1;
while ($row = mysql_fetch_array($rows)) {
$mails .= $row['mail'].', ';
if ($count%300 == 0) {
$mails = substr($mails, 0, -1);
$to = $mails;
$headers .= "Bcc: $to\r\n";
$headers .= 'From: '."البرمجة". "\r\n";
$mail = mail($amr, $subject, $all_message, $headers);
if(!$mail){
echo "it's bad thing";
}
$mails = NULL;
}
$count++;
}
if ($mails != NULL) {
$mails = substr($mails, 0, -1);
$to = $mails;
$headers .= "Bcc: $to\r\n";
$headers .= 'From: '.$name.' <'.$from.'>' . "\r\n";
$mail = mail($amr, $subject, $all_message, $headers);
if(!$mail){
echo "it's bad thing";
}
}
$tmpl->setAttribute("successful","visibility","show");
$tmpl->addVar("successful","MSG","تم ارسال الرسالة بنجاح لجميع القائمة البريدية .");
}else{
$tmpl->addVar("add_fproject","message_title",$message_title);
$tmpl->addVar("add_fproject","message",$message);
$tmpl->setAttribute("error","visibility","show");
$tmpl->addVar("error","MSG",$error);
}
}else{
}
?>