viewmail-info
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [VM] Filter outgoing mail


From: blueman
Subject: Re: [VM] Filter outgoing mail
Date: Mon, 04 Jun 2012 00:14:58 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Uday Reddy <address@hidden> writes:
> blueman writes:
>
>> Well, I wasn't able to find any hooks, but I solved my problem for now
>> by putting 'before' advice on the function smtpmail-via-smtp. That is
>> where the final changes are made to the email (including adding on mime
>> & content headers and stripping off the on RFC standard headers) before
>> it is actually sent.
>
> Hi JJK, I couldn't see why this can't be done in vm-mail-send-hook or its
> senior, mail-send-hook.

The problem is that those hooks come too early in the process before all
the headers and mimification is done.

> Structurally, tagging this on to smtpmail isn't quite right because it has
> nothing to do with smtpmail as such.  It wouldn't fire if you use some other
> mail sending mechanism.

I agree but I couldn't find any earlier hooks and this was the only
"clean" (though non-natural) place I could add my code via 'advice'
without hacking into the actual vm routines themselves.

Basically, I wanted the ability to modify the outgoing email when the
header & body is complete and it is just about to be sent off to the
mail transfer agent whether smtpmail or anything else.

Unfortunately, I couldn't find a hook that gave access to the entire
final email header and body. If I am missing something, please enlighten
me.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]