rmail-get-new-mail

rmail-get-new-mail is an interactive compiled Lisp function in `rmail.el'.


(rmail-get-new-mail &optional FILE-NAME)

Move any new mail from this Rmail file's inbox files.
The buffer-local variable `rmail-inbox-list' specifies the list
of inbox files. By default, this is nil, except for your primary
Rmail file `rmail-file-name'. In this case, when you first visit
the Rmail file it is initialized using either
`rmail-primary-inbox-list', or the "MAIL" environment variable,
or the function `user-login-name' and the directory
`rmail-spool-directory' (whose value depends on the operating system).

The command `set-rmail-inbox-list' sets `rmail-inbox-list' to the
value you specify.

You can also specify the file to get new mail from just for one
instance of this command. In this case, the file of new mail is
not changed or deleted. Noninteractively, you can pass the inbox
file name as an argument. Interactively, a prefix argument
causes us to read a file name and use that file as the inbox.

If the variable `rmail-preserve-inbox' is non-nil, new mail will
always be left in inbox files rather than deleted.

Before doing anything, this runs `rmail-before-get-new-mail-hook'.
Just before returning, it runs `rmail-after-get-new-mail-hook',
whether or not there is new mail.

If there is new mail, it runs `rmail-get-new-mail-hook', saves
the updated file, and shows the first unseen message (which might
not be a new one). It returns non-nil if it got any new messages.