[imp] Wish: Reply to author of mailing list post
Chris Hastie
lists at oak-wood.co.uk
Fri Jan 3 18:33:12 PST 2003
On Thu, 2 Jan 2003, Chris Hastie <lists at oak-wood.co.uk> wrote
>I really like the 'Reply to List' option, which presumably uses the
>List-Post: header to decide on the To: address for replies.
>
>It would be nice if when a List-Post: header is detected and the 'Reply
>to List', the 'Reply' option opened a compose window addressed to the
>From: header address of the original post if the Reply-To: address
>matches the List-Post: address. This would ease the task of replying to
>the original poster only in cases where the list software has set the
>Reply-to: header to the list address.
I thought I'd have a go at this myself. This is what I've come up with
so far - I'm afraid I'm not entirely familiar with generating patches so
I hope it makes sense. I'm aware that this has at least one problem - if
the Reply-to: header is more than just a raw address I think it won't
work. Any help with this greatly appreciated - is there a function that
I can use to extract just the address?
diff against imp/compose.php,v 2.608 2003/01/03 02:54:27 slusarz Exp $
317,318c317,320
< ($header['to'] = IMP::addrArray2String($imp_headers->getOb('reply_to'))) ||
< ($header['to'] = IMP::addrArray2String($imp_headers->getOb('from')));
---
> if (!($header['to'] = Horde::getFormData('to'))){
> ($header['to'] = IMP::addrArray2String($imp_headers->getOb('reply_to'))) ||
> ($header['to'] = IMP::addrArray2String($imp_headers->getOb('from')));
> }
diff against imp/templates/message/navbar.inc
9c9,13
< | <?php echo Horde::link(IMP::composeLink(array(), array('actionID' => REPLY, 'index' => $index, 'identity' => $identity, 'array_index' => $array_index)), _("Reply"), 'widget') . _("Reply") ?></a>
---
> | <?php if (isset($reply_author)): ?>
> <?php echo Horde::link(IMP::composeLink($reply_author, array('actionID' => REPLY, 'index' => $index, 'identity' => $identity, 'array_index' => $array_index)), _("Reply"), 'widget') . _("Reply") ?></a>
> <?php else: ?>
> <?php echo Horde::link(IMP::composeLink(array(), array('actionID' => REPLY, 'index' => $index, 'identity' => $identity, 'array_index' => $array_index)), _("Reply"), 'widget') . _("Reply") ?></a>
> <?php endif; ?>
diff against imp/message.php,v 2.439 2003/01/03 02:15:42 jan Exp $
411a412,414
> if ($reply_list == IMP::addrArray2String($imp_headers->getOb('reply_to'))){
> $reply_author = IMP::addrArray2String($imp_headers->getOb('from'));
> }
--
Chris Hastie
More information about the imp
mailing list