1 |
;;; imap.el --- imap library |
;;; imap.el --- imap library |
2 |
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 |
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 |
3 |
;; Free Software Foundation, Inc. |
;; Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Author: Simon Josefsson <jas@pdc.kth.se> |
;; Author: Simon Josefsson <jas@pdc.kth.se> |
69 |
;; imap-message-append, imap-envelope-from |
;; imap-message-append, imap-envelope-from |
70 |
;; imap-body-lines |
;; imap-body-lines |
71 |
;; |
;; |
72 |
;; It is my hope that theese commands should be pretty self |
;; It is my hope that these commands should be pretty self |
73 |
;; explanatory for someone that know IMAP. All functions have |
;; explanatory for someone that know IMAP. All functions have |
74 |
;; additional documentation on how to invoke them. |
;; additional documentation on how to invoke them. |
75 |
;; |
;; |
325 |
(defvar imap-error nil |
(defvar imap-error nil |
326 |
"Error codes from the last command.") |
"Error codes from the last command.") |
327 |
|
|
328 |
;; Internal constants. Change theese and die. |
;; Internal constants. Change these and die. |
329 |
|
|
330 |
(defconst imap-default-port 143) |
(defconst imap-default-port 143) |
331 |
(defconst imap-default-ssl-port 993) |
(defconst imap-default-ssl-port 993) |
1456 |
(defun imap-fetch (uids props &optional receive nouidfetch buffer) |
(defun imap-fetch (uids props &optional receive nouidfetch buffer) |
1457 |
"Fetch properties PROPS from message set UIDS from server in BUFFER. |
"Fetch properties PROPS from message set UIDS from server in BUFFER. |
1458 |
UIDS can be a string, number or a list of numbers. If RECEIVE |
UIDS can be a string, number or a list of numbers. If RECEIVE |
1459 |
is non-nil return theese properties." |
is non-nil return these properties." |
1460 |
(with-current-buffer (or buffer (current-buffer)) |
(with-current-buffer (or buffer (current-buffer)) |
1461 |
(when (imap-ok-p (imap-send-command-wait |
(when (imap-ok-p (imap-send-command-wait |
1462 |
(format "%sFETCH %s %s" (if nouidfetch "" "UID ") |
(format "%sFETCH %s %s" (if nouidfetch "" "UID ") |