} else { $to = $header->fromaddress; } $subject = 'Re: ' . $header->subject; $body = add_quoting(stripslashes(imap_body($imap, $messageid))); imap_close($imap); display_new_message_form($_SESSION['auth_user'], $to, $cc, $subject, $body); } break; case 'forward': //set message as quoted body of current message if (!$imap) { $imap = open_mailbox($_SESSION['auth_user'], $_SESSION['selected_account']); } if ($imap) { $header = imap_header($imap, $messageid); $body = add_quoting(stripslashes(imap_body($imap, $messageid))); $subject = 'Fwd: ' . $header->subject; imap_close($imap); display_new_message_form($_SESSION['auth_user'], $to, $cc, $subject, $body); } break; case 'new-message': display_new_message_form($_SESSION['auth_user'], $to, $cc, $subject, $body); break; } } //***************************************************************************** // Stage 4: footer //***************************************************************************** do_html_footer();
break; } break; case 'forward': //set message as quoted body of current message if (!$imap) { $imap = open_mailbox($_SESSION['auth_user'], $_SESSION['selected_account']); } if ($imap) { $header = imap_header($imap, $messageid); $body = add_quoting(stripslashes(imap_body($imap, $messageid))); $subject = 'Fwd: ' . $header->subject; imap_close($imap); if ($_POST) { display_new_message_form($_SESSION['auth_user'], $to, $cc, $subject, $body); } else { display_new_message_form($_SESSION['auth_user']); } break; } break; case 'new-message': if (isset($to) && isset($cc) && isset($subject) && isset($body)) { display_new_message_form($_SESSION['auth_user'], $to, $cc, $subject, $body); } else { display_new_message_form($_SESSION['auth_user']); } break; } } }
} else { $to = $header->fromaddress; } $subject = 'Re: ' . $header->subject; $body = add_quoting(stripslashes(imap_body($imap, $messageid))); imap_close($imap); display_new_message_form($HTTP_SESSION_VARS['auth_user'], $to, $cc, $subject, $body); } break; case 'forward': //set message as quoted body of current message if (!$imap) { $imap = open_mailbox($HTTP_SESSION_VARS['auth_user'], $HTTP_SESSION_VARS['selected_account']); } if ($imap) { $header = imap_header($imap, $messageid); $body = add_quoting(stripslashes(imap_body($imap, $messageid))); $subject = 'Fwd: ' . $header->subject; imap_close($imap); display_new_message_form($HTTP_SESSION_VARS['auth_user'], $to, $cc, $subject, $body); } break; case 'new-message': display_new_message_form($HTTP_SESSION_VARS['auth_user'], $to, $cc, $subject, $body); break; } } //***************************************************************************** // Stage 4: footer //***************************************************************************** do_html_footer();