Update of /cvsroot/hastymail/hastymail/html
In directory sc8-pr-cvs1:/tmp/cvs-serv15970/html
Modified Files:
compose.php
Log Message:
more work on replies
Index: compose.php
===================================================================
RCS file: /cvsroot/hastymail/hastymail/html/compose.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- compose.php 26 Dec 2002 20:47:43 -0000 1.20
+++ compose.php 27 Dec 2002 19:56:00 -0000 1.21
@@ -103,15 +103,30 @@
}
if (isset($headers['subject'])) {
if (!preg_match("/^re:/i", $headers['subject'])) {
- $subject = "Re: ".$headers['subject'];
+ $subject = "Re: ".htmlentities($headers['subject']);
}
else {
- $subject = $headers['subject'];
+ $subject = htmlentities($headers['subject']);
}
}
else {
$subject = '';
}
+ if (isset($headers['message-id'])) {
+ $messid = $headers['message-id'];
+ }
+ else {
+ $messid = '';
+ }
+ if (isset($headers['in-reply-to'])) {
+ $inreplyto = $headers['in-reply-to'];
+ }
+ else {
+ $inreplyto = '';
+ }
+ if (isset($headers['references'])) {
+ $refs = $headers['references'];
+ }
$cc = '';
$bcc = '';
}
@@ -123,6 +138,9 @@
$bcc = '';
$subject = '';
$message = '';
+ $messid = '' ;
+ $inreplyto = '';
+ $refs = '';
}
/* check for from addresses set in the user settings */
@@ -163,9 +181,15 @@
$message = $_POST['message'];
}
else {
+ if (isset($_POST['reply'])) {
+ $reply = true;
+ }
+ else {
+ $reply = false;
+ }
if (!hm_send_mail($_POST['to'], $_POST['cc'], $_POST['bcc'], $_POST['subject'],
$_POST['message'], $config['smtp_server'], $config['hostname'], $config['domain'],
- $_POST['from'])) {
+ $_POST['from'], $_POST['inreplyto'], $_POST['messid'], $_POST['refs'], $reply)) {
$to = $_POST['to'];
$cc = $_POST['cc'];
@@ -178,8 +202,14 @@
/* compose form */
echo "<form action=\"compose.php\" method=\"post\">\n",
- "<input type=\"hidden\" value=\"",session_id(),"\" name=\"id\">\n",
- "<br>\n",
+ "<input type=\"hidden\" value=\"",$refs,"\" name=\"refs\">\n",
+ "<input type=\"hidden\" value=\"",$messid,"\" name=\"messid\">\n",
+ "<input type=\"hidden\" value=\"",$inreplyto,"\" name=\"inreplyto\">\n",
+ "<input type=\"hidden\" value=\"",$id,"\" name=\"id\">\n";
+if (isset($_GET['reply']) && $_GET['reply'] == 1) {
+ echo "<input type=\"hidden\" value=\"1\" name=\"reply\">\n";
+}
+echo "<br>\n",
"<table align=\"center\">\n",
" <tr>\n",
" <td align=\"left\">\n",
|