[Top][All Lists]

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

Re: [PATCH] display-time-mail-icon and directory

From: Pavel Janík
Subject: Re: [PATCH] display-time-mail-icon and directory
Date: Sat, 26 Jan 2002 12:42:04 +0100
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i386-suse-linux-gnu)

   From: address@hidden (Kim F. Storm)
   Date: 21 Jan 2002 00:50:12 +0100

Hi Kim,

   > I think it should be able to poll POP3 mailboxes as well.
   > The following code can be used as a starting point (but it too can only
   > poll one pop3 mailbox):


here is the version which uses pop3.el from Gnus:

(require 'pop3)

(setq pop3-maildrop "username")
(setq pop3-mailhost "pop3server")

(defun pop3-check-for-new-mail ()
  "Check the number of new e-mails in POP3 mailbox."
  (let ((process (pop3-open-server pop3-mailhost pop3-port)))
    (if (and pop3-password-required (not pop3-password))
        (setq pop3-password
              (pop3-read-passwd (format "Password for %s: " pop3-maildrop))))
    (pop3-user process pop3-maildrop)
    (pop3-pass process)
    (message "You have %d new mails." (car (pop3-stat process)))
    (pop3-quit process)))

Can you please look at it?
Pavel Janík

No matter how hard you try, you can't make a racehorse out of a pig.
You can, however, make a faster pig.
                  -- An unknown author in GNU Emacs about Emacs's byte-opt

reply via email to

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