Changed announceEMail to stop polling and use a callback
authorAndrew DeFaria <Andrew@DeFaria.com>
Tue, 7 Jul 2020 20:50:30 +0000 (13:50 -0700)
committerAndrew DeFaria <Andrew@DeFaria.com>
Tue, 7 Jul 2020 20:50:30 +0000 (13:50 -0700)
commit56813f152ca6be3f803b1363bbe2afddfc1329b0
tree9c2066003997044879c53449e84a04be7c5ed5a5
parent247c8672189aaa76dc94560b1afa574d0fb42165
Changed announceEMail to stop polling and use a callback

This was done by switching to using Mail::IMAPTalk. No IMAPTalk does not
do the speaking but it "talks" to IMAP and it allows me to register a
callback. Much more efficient and timely.

Maybe someday I'll implement a mechanism of looking for other
announceEmail's on the LAN and have it inform the others that this
announceEmail will handle the announcement. This is because I run this
on both my desktop and my MacBook so while they're both in the same room
I hear the announcement twice. One solution would be to poll the LAN
and see if there are any more announceEmail processes and then use
IPC to communicate between them. Of course, if they are physically
very distant we probably want the announcement being a true broadcast.
bin/announceEmail.pl