- (while (> i 0)
- (setq address
- (append address
- (list
- (list
- (concat "po:"
- (read-from-minibuffer
- "Email address (user@mailhost): "))
- (completing-read
- "Authentification Method (TAB to completion): "
- '(("pass" 1) ("apop" 2)) nil t nil)))))
- (setq i (- i 1)))
-
- ;; Replace "hoge" -> 'hoge
- (mapcar
- (lambda (x)
- (if (string-equal (nth 1 x) "pass")
- (setcar (cdr x) 'pass)
- (setcar (cdr x) 'apop)))
- address)
- (setq pop3-fma-spool-file-alist address)
-
- ;; Set movemail type.
- (let ((movemail-type
- (completing-read
- "Select movemail type for retreave mail (TAB to completion): "
- '(("exe" 1) ("lisp" 2))
- nil t nil))
- )
- (if (string-equal movemail-type "exe")
- (let ((options
- (read-from-minibuffer "movemail options: ")))
- (setq pop3-fma-movemail-arguments (split-string options "[\t ]+"))))
- (if (string-equal movemail-type "exe")
- (setq pop3-fma-movemail-type 'exe)
- (setq pop3-fma-movemail-type 'lisp))))
+ (if (not (locate-library "mail-source"))
+ (progn
+ (while (> i 0)
+ (setq address
+ (append address
+ (list
+ (list
+ (concat "po:"
+ (read-from-minibuffer
+ "Email address (user@mailhost): "))
+ (completing-read
+ "Authentification Method (TAB to completion): "
+ '(("pass" 1) ("apop" 2)) nil t nil)))))
+ (setq i (- i 1)))
+ ;; Replace "hoge" -> 'hoge
+ (mapcar
+ (lambda (x)
+ (if (string-equal (nth 1 x) "pass")
+ (setcar (cdr x) 'pass)
+ (setcar (cdr x) 'apop)))
+ address)
+ (setq pop3-fma-spool-file-alist address)
+ ;; Set movemail type.
+ (let ((movemail-type
+ (completing-read
+ "Select movemail type for retreave mail (TAB to completion): "
+ '(("exe" 1) ("lisp" 2))
+ nil t nil))
+ )
+ (if (string-equal movemail-type "exe")
+ (let ((options
+ (read-from-minibuffer "movemail options: ")))
+ (setq pop3-fma-movemail-arguments (split-string options "[\t ]+"))))
+ (if (string-equal movemail-type "exe")
+ (setq pop3-fma-movemail-type 'exe)
+ (setq pop3-fma-movemail-type 'lisp))))
+ ;;
+ ;; Use mail-source.el
+ (setq mail-source nil)
+ (while (> i 0)
+ (let ((user (read-from-minibuffer "Mail Account name : "))
+ (server (read-from-minibuffer "Mail server : "))
+ (auth (completing-read
+ "Authentification Method (TAB to completion): "
+ '(("pop" 1) ("apop" 2)) nil t nil))
+ (islisp (y-or-n-p "Do you use pop3.el to fetch mail? ")))
+ (if (not islisp)
+ (let ((prog (read-file-name "movemail program name: "
+ exec-directory "movemail"))
+ (args (read-from-minibuffer "movemail options: " "-pf")))
+ (setq mail-source
+ (append mail-source
+ (list
+ (list
+ 'pop
+ :user user
+ :server server
+ :program
+ (format "%s %s %s %s %s"
+ prog
+ args
+ "po:%u"
+ "%t"
+ "%p")
+ :authentication auth)))))
+ (setq mail-source
+ (append mail-source
+ (list
+ (list
+ 'pop
+ :user user
+ :server server
+ :authentication auth))))))
+ (setq i (- i 1)))
+ ;; Replace "hoge" -> 'hoge
+ (mapcar
+ (lambda (x)
+ (if (string-equal (car (last x)) "pop")
+ (setcar (last x) (quote 'pop))
+ (setcar (last x) (quote 'apop))))
+ mail-source)
+ (setq gnus-offline-mail-source mail-source)))
+
+ (setq save-passwd
+ (y-or-n-p "Do you save password information to newsrc file? "))