التطور للوب بواسطةmysql!PHP - ويلينغ — الصفحة ٦٨٢

بناء خدمة بريد إلكتروني متوافق مع الوب الفصل 27 الرد على البريد أو إعادة توجيهه الوظائف Reply و Reply All و Forward كلها ترسل البريد بنفس الطريقة التي تذهب بها الرسالة الجديدة. الفرق في كيفية عملها هو أنها تملأ أجزاء من نموذج الرسالة الجديدة قبل إظهاره للمستخدم. أعد النظر إلى الشكل (827). الرسالة التي نعيد توجيهها تم إعطاؤها مسافة بادئة بواسطة الرمز ، وتم بدء سطر الموضوع بالكلمة To بشكل مماثل الخيارات Reply و Reply All ستكتب أسماء المستلمين، وسطر الموضوع، والرسالة المعطاة مسافة بادئة. الشيفرة لتحقيق هذا يتم تنشيطها في قسم المتن من index.php، كالتالي: case 'reply-all' : { //set cc as old cc line if(!$imap) $imap = open_mailbox($auth_user, $selected_account); if($imap) $header = imap_header($imap, $messageid); if ($header->reply_toaddress) $to = $header->reply_toaddress; else $to = $header -> fromaddress; $cc = $header->ccaddress; $subject = 'Re: '.$header-subject: $body = add_quoting(stripslashes(imap_body($imap, $messageid))); imap_close($imap); display_new_message_form($auth_user, $to, $cc. $subject, $body); } break; } case 'reply' : f //set to address as reply-to or from of the current message if(!$imap) = open_mailbox($auth_user, $selected_account); $imap if($imap) { $header = imap_header($imap, $messageid); } if($header->reply_toaddress) $to = $header-reply_toaddress; else $to = $header->fromaddress; $subject = 'Re: '.$header-subject: $body = add_quoting(stripslashes(imap_body ($imap, $messageid))); imap_close($imap); display_new_message_form($auth_user, $to, $cc, $subject, $body); break; //note deliberately no 'break' 698
ص٦٨٢

نص مستخرج آليًا من الصورة، وقد يقع فيه خطأ.