Well, here it is:
http://code.google.com/p/mail-warn-me/

The GrowlMail source was a big help in getting this to work - especially for
the preferences.

Thank you GrowlMail team for figuring out how to swizzle the Mail internals.

I still have more work to do on this, but most of
the particularly challenging parts are complete and I have already been
using this and it works for it's original purpose so far.

- Jeff

On Wed, Feb 23, 2011 at 1:54 AM, Chaim Peck <[email protected]> wrote:

> I decided to use this tutorial and write the plugin in python:
>
> http://eaganj.free.fr/weblog/?post/2009/07/14/Demystifying-Mail.app-Plugins-on-Leopard
>
>
> <http://eaganj.free.fr/weblog/?post/2009/07/14/Demystifying-Mail.app-Plugins-on-Leopard>But
> I have found that it's not picking up the hook inside MailDocumentEditor's
> send method.  My guess is this has something to do with using 10.6 instead
> of 10.5 like the tutorial was written for, although when I do a class-dump
> the class and method are clearly there.
>
> I'm not sure what else I can do, but perhaps some of the folks who worked
> on GrowlMail might have some insight for getting this to work with 10.6.
>
> In case anyone's curious, here is the source:
>
> from AppKit import *
> from Foundation import *
> import objc
>
> MailDocumentEditor = objc.lookUpClass("MailDocumentEditor")
> class MyMessageEditor(MailDocumentEditor):
>     __slots__ = ()
>     def send_(self, sender):
>         NSLog('Trying to send something with MyPlugin!')
>         super(MyMessageEditor, self).send_(sender)
>
> MVMailBundle = objc.lookUpClass('MVMailBundle')
> class MyPlugin(MVMailBundle):
>     def initialize (cls):
>         MVMailBundle.registerBundle()
>         MyMessageEditor.poseAsClass_(MailDocumentEditor)
>         NSLog("MyPlugin registered with Mail")
>     initialize = classmethod(initialize)
>
>
> All that it should do is write the console when I send a message and it's
> not currently doing that.  It might not be possible on 10.6...
>
> - Chaim
>
> On Feb 22, 2011, at 8:40 PM, Evan Schoenberg, M.D. wrote:
>
>
> On Feb 22, 2011, at 7:36 PM, Christopher Forsythe wrote:
>
>
>
> On Tue, Feb 22, 2011 at 7:32 PM, Peter Hosey <[email protected]> wrote:
>
>> On Feb 22, 2011, at 17:30:04, Christopher Forsythe wrote:
>> > I think a better thing to do would be to build a plugin that makes sure
>> that when you hit reply or reply all, that it sends with the same account
>> that it was sent to.
>>
>> Mail already sets this by default, though.
>>
>>
> Then I'm not sure what the problem would be if it were working. The
> scenario he describes, to me at least, seems like that isn't working.
>
>
> It didn't used to.  I wrote a plugin to solve that exact problem back in
> 2006.  I haven't kept it up to date, and I'm sure it doesn't conform to the
> current plugin API, but it might be another useful starting point for you,
> Chaim. I've attached a ZIP of my source, as (like many of my tiny coding
> projects) it doesn't have a proper home on the web currently.
>
> <MailCorrectSendNewMailFrom.zip>
>
> -Evan
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Growl Discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/growldiscuss?hl=en.

Reply via email to