Gnus development mailing list
 help / color / mirror / Atom feed
From: Kevin Greiner <kgreiner@xpediantsolutions.com>
Subject: Re: message-send-mail-function, agent, and a day of work
Date: Thu, 15 Apr 2004 15:28:28 -0500	[thread overview]
Message-ID: <ullkxc7f7.fsf@xpediantsolutions.com> (raw)
In-Reply-To: <sdy8ox3xnv.fsf@wes.hardakers.net>

Wes Hardaker <wes@hardakers.net> writes:

>>>>>> On Thu, 15 Apr 2004 12:20:31 -0500, Kevin Greiner <kgreiner@xpediantsolutions.com> said:
>
> Kevin> Now, one question, are you writing your smtp switch logic into
> Kevin> the function called by message-send-mail-function?  I believe
> Kevin> that you must, if you want offline mail to also be send via
> Kevin> multiple smtp servers.
>
> Currently its written into a hook call at message-send-hook.  It
> decides, based on the contents of the buffer, what to set the
> gnus-agent-send-mail-function to (it used to change
> message-send-mail-function, which didn't work as previously
> discussed).
>
> I haven't tried it off line yet.
>
> My suggestion previously was how to fix the problem of my original
> assumption which didn't hold true.  What I'm actually doing now works
> just fine, but I'd rather that people not have to spend a day thinking
> about it like I did.

Your original assumption should have been valid.  The fact that I
objected to your patch does not mean that the agent is implemented
correctly.  It has a bug that needs to be fixed.  In fact, since I
threw a wrench into your plans, I'll take a stab at patching it for
you.

If you are truely changing your code to set
gnus-agent-send-mail-function then you going down the wrong path.
Your code will now break for those users who have turned the agent off
as gnus-agent-send-mail-function will never be called.

I think that you should really consider how you want to handle offline
and delayed (message drafts) mail before proceeding with
implementation.  When offline, your messages are going to be copied
into the queue group.  When you go online, you have an option to mail
every message in queue. The message-send-hook will, I believe, be
called twice.  The first time will be as the message is added to queue
then again when the message is actually mailed.

I'm going to assume that the mail in queue should be dispatched to
multiple smtp servers so that being offline is transparent to the
actual delivery.  If that is the case, I believe that you'll need to
have the first message-send-hook put the selected smtp server into the
message as a header.  The second message-send-hook could then decode,
and remove, the custom header.

Kevin




  reply	other threads:[~2004-04-15 20:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-15 16:05 Wes Hardaker
2004-04-15 17:20 ` Kevin Greiner
2004-04-15 18:26   ` Wes Hardaker
2004-04-15 20:28     ` Kevin Greiner [this message]
2004-04-15 20:35       ` Wes Hardaker
2004-04-15 23:50         ` Kevin Greiner
2004-04-16  4:09           ` Wes Hardaker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ullkxc7f7.fsf@xpediantsolutions.com \
    --to=kgreiner@xpediantsolutions.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).