[Omail-devel] patch for References: In-Reply-To:
Brought to you by:
swix
From: Sunagawa K. / <ko...@of...> - 2000-10-31 05:01:56
|
Hi all, I made a patch for References: & In-Reply-To: . *** omail.pl-orig Tue Oct 31 13:42:49 2000 --- omail.pl Tue Oct 31 13:42:37 2000 *************** *** 1499,1504 **** --- 1505,1512 ---- my $subject = ''; my $body = ''; my $composetype = param("composetype") || ''; + my $references = ''; + my $inreplyto = ''; if ($composetype) { $to = param("to") || ''; *************** *** 1536,1541 **** --- 1544,1553 ---- if (($composetype eq "reply") || ($composetype eq "replyall")) { $subject = $message{"subject"} || ''; $subject = "Re: " . $message{"subject"} unless ($message{"subject"} =~ /^re:/i); + #ko...@sy... + $message{references} = '' if($message{references} eq 'N/A'); + $references = " $message{references} <$message{messageid_header}>"; + $inreplyto = " <$message{messageid_header}>"; if (defined($message{"replyto"})) { $to = $message{"replyto"} || ''; } else { *************** *** 1631,1636 **** --- 1643,1656 ---- print hidden(-name=>'folder', -default=>$folder, -override=>'1'); + # ko...@sy... + print hidden(-name=>'references', + -default=>$references, + -override=>'1'); + print hidden(-name=>'inreplyto', + -default=>$inreplyto, + -override=>'1'); + print '<a href="Javascript:GoAddressWindow(',"'to'",')"><B>',$TXT{'to'},':</B></a></td><td valign="middle" align="left" bgcolor="#DDDDDD">', textfield(-name=>'to', -default=>$to, *************** *** 1787,1792 **** --- 1807,1814 ---- my $subject = param("subject"); my $body = param("body") || ''; my $messageid = param("message_id"); + my $references = param("references"); + my $inreplyto = param("inreplyto"); $body =~ s/\r//g; # strip ^M characters from message. How annoying! my $attachment = param("attachment"); ### Trim the path info from the filename *************** *** 1809,1814 **** --- 1831,1841 ---- $messagecontents .= "Reply-to: $replyto\n" if $replyto; print SENDMAIL "Subject: $subject\n"; $messagecontents .= "Subject: $subject\n"; + # ko...@sy... + print SENDMAIL "References: $references\n"; + $messagecontents .= "References: $references\n"; + print SENDMAIL "In-Reply-To: $inreplyto\n"; + $messagecontents .= "In-Reply-To: $inreplyto\n"; print SENDMAIL "X-Mailer: oMail $version - http://webmail.omnis.ch\n"; $messagecontents .= "X-Mailer: oMail $version - http://webmail.omnis.ch\n"; print SENDMAIL "X-IPAddress: $ENV{REMOTE_ADDR}\n"; *************** *** 2202,2208 **** my ($currentheader, $currentbody, $currentfrom, $currentdate, $currentsubject, $currentid, $currenttype, $currentto, $currentcc, ! $currentreplyto, $currentencoding); if ( (-f "$spoolfile") && !(-l "$spoolfile") && --- 2229,2236 ---- my ($currentheader, $currentbody, $currentfrom, $currentdate, $currentsubject, $currentid, $currenttype, $currentto, $currentcc, ! $currentreplyto, $currentencoding, $currentreferences, ! $currentinreplyto); if ( (-f "$spoolfile") && !(-l "$spoolfile") && *************** *** 2220,2226 **** $currentheader = $currentbody = $currentfrom = $currentdate = $currentsubject = $currentid = $currenttype = $currentto = ! $currentcc = $currentreplyto = $currentencoding = 'N/A'; ($currentheader, $currentbody) = split(/\n\r*\n/, $currmessage, 2); my $lastline = 'NONE'; foreach (split(/\n/, $currentheader)) { --- 2248,2255 ---- $currentheader = $currentbody = $currentfrom = $currentdate = $currentsubject = $currentid = $currenttype = $currentto = ! $currentcc = $currentreplyto = $currentencoding = ! $currentreferences = $currentinreplyto = 'N/A'; ($currentheader, $currentbody) = split(/\n\r*\n/, $currmessage, 2); my $lastline = 'NONE'; foreach (split(/\n/, $currentheader)) { *************** *** 2233,2238 **** --- 2262,2269 ---- elsif ($lastline eq 'ENCODING') { $currentencoding .= $_ } elsif ($lastline eq 'TO') { $currentto .= $_ } elsif ($lastline eq 'CC') { $currentcc .= $_ } + elsif ($lastline eq 'REFERENCES') { $currentreferences .= $_ } + elsif ($lastline eq 'INREPLYTO') { $currentinreplyto.= $_ } } elsif (/^from:\s+(.+)$/ig) { $currentfrom = $1; $lastline = 'FROM'; *************** *** 2261,2266 **** --- 2292,2303 ---- } elsif (/^content-transfer-encoding:\s+(.+)$/ig) { $currentencoding = $1; $lastline = 'ENCODING'; + } elsif (/^references:\s+(.+)$/ig) { + $currentreferences = $1; + $lastline = 'REFERENCES'; + } elsif (/^in-reply-to:\s+(.+)$/ig) { + $currentinreplyto = $1; + $lastline = 'INREPLYTO'; } else { $lastline = 'NONE'; } *************** *** 2365,2372 **** --- 2402,2412 ---- $message{date} = $currentdate; $message{subject} = $currentsubject; $message{messageid} = $messageid; + $message{messageid_header} = $currentid; $message{contenttype} = $currenttype; $message{encoding} = $currentencoding; + $message{references} = $currentreferences; + $message{inreplyto} = $currentinreplyto; $message{attachment} = \@attachment; $message{status} = $status; --- Sunagawa Koji ko...@of... Okinawa FreeBSD Users Group http://www.ofug.net/~koj/ |