On Mon, Apr 26, 2004 at 08:15:57AM -0700, Hugh Beaumont wrote:
> I would like to add an option to sqwebmail so that the default from address when 
> replying to a
> message is the same as what the message was sent to. 

Hmm -
(1) what happens if the message has multiple To: recipients?
(2) what happens if the message was sent To: someone else, but you are a
    Cc: recipient?
(3) what happens if the message was sent To: someone else, but you are a
    Bcc: recipient?

A safer bet would be to use the envelope-recipient, but
- that's not in a standard header (it might be in Delivered-To:,
  Envelope-To: or X-Envelope-To: for example)
- if the message has been forwarded, that won't do what you want.

e.g. if [EMAIL PROTECTED] forwards to [EMAIL PROTECTED], then the
envelope recipient will be '[EMAIL PROTECTED]' by the time it is received.

A reasonable workaround is to forward [EMAIL PROTECTED] to a mailbox
reserved for this purpose. Then you can set the From: address for all
replies from that mailbox to be [EMAIL PROTECTED] However that does mean
the user will have to check mail at that mailbox, as well as at their normal
mailbox.

I guess a more acceptable solution for you would be
- have multiple From: addresses permitted for this mailbox
- allow the user to select these from a drop-down menu
- if one of those addresses appears in the To: or Cc: header then choose
  that as the default, otherwise just choose the first.

But that doesn't sound particularly easy to implement :-(

Regards,

Brian.

Reply via email to