|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
;; SET YOUR INFO HERE; TOO LAZY TO MAKE A PREF PANE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
;; Put here the sender you which to use for mailing lists exactly as it appears in the From: popup UI. |
|
(set $my_list_sender "Your Full Name <[email protected]>") |
|
;; Put here the email addresses for every mailing list that you send email to. |
|
(set $list_addresses (array "[email protected]" "[email protected]")) |
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
|
|
(class ComposeBackEnd |
|
(- (void) updateSenderToUserListSenderAndNotifyHeadersEditor is |
|
(self setSender:$my_list_sender) |
|
(((self delegate) headersEditor) mailAccountsDidChange))) |
|
|
|
(class MailDocumentEditor |
|
(- (void) withMailingListAddress_finishLoadingEditor is |
|
(self withMailingListAddress_finishLoadingEditor) |
|
(if (((self settings) "Messages") find:(do (message) ((message headers) headersForKey:"list-id"))) |
|
((self backEnd) updateSenderToUserListSenderAndNotifyHeadersEditor)))) |
|
|
|
(class HeadersEditor |
|
(- (void) withMailingListAddress_recipientsDidChange: (id) sender is |
|
(self withMailingListAddress_recipientsDidChange:sender) |
|
(let (backEnd (@documentEditor backEnd)) |
|
(let (recipients ((backEnd allRecipients) componentsJoinedByString:"\n")) |
|
(if ($list_addresses find:(do (addr) (!= (recipients rangeOfString:"<#{addr}>") '(-1 0)) )) |
|
(backEnd updateSenderToUserListSenderAndNotifyHeadersEditor)))))) |
|
|
|
|
|
(MailDocumentEditor exchangeInstanceMethod:"finishLoadingEditor" withMethod:"withMailingListAddress_finishLoadingEditor") |
|
(HeadersEditor exchangeInstanceMethod:"recipientsDidChange:" withMethod:"withMailingListAddress_recipientsDidChange:") |
|
|
|
; (load "console") |
|
; (set $console ((NuConsoleWindowController alloc) init)) |
|
; ($console toggleConsole:nil) |
|
|
|
(NSLog "Loaded plugin SomethingSomethingMailingListsWhatever") |