Function: imap-message-append

imap-message-append is a byte-compiled function defined in imap.el.gz.

Signature

(imap-message-append MAILBOX ARTICLE &optional FLAGS DATE-TIME BUFFER)

Documentation

Append ARTICLE (a buffer) to MAILBOX on server in BUFFER.

FLAGS and DATE-TIME is currently not used. Return a cons holding uidvalidity of MAILBOX and UID the newly created article got, or nil on failure.

Source Code

;; Defined in /usr/src/emacs/lisp/net/imap.el.gz
(defun imap-message-append (mailbox article &optional _flags _date-time buffer)
  "Append ARTICLE (a buffer) to MAILBOX on server in BUFFER.
FLAGS and DATE-TIME is currently not used.  Return a cons holding
uidvalidity of MAILBOX and UID the newly created article got, or nil
on failure."
  (let ((mailbox (imap-utf7-encode mailbox)))
    (with-current-buffer (or buffer (current-buffer))
      (and (let ((imap-current-target-mailbox mailbox))
	     (imap-ok-p
	      (imap-send-command-wait
	       (list "APPEND \"" mailbox "\" "  article))))
	   (imap-message-appenduid-1 mailbox)))))