ME:getpop example aka (ME1.lsp)

Started by CaveGuy, October 26, 2002, 12:01:11 PM

Previous topic - Next topic


This is the first very small piece of the Mail Editor application example, it preloads the 'mail-dir with ".pop3" message files for processing by the functions to be found in the "ME2.lsp" set.

;; Expanded E-Mail examples


;; Version 1.0 (CaveGuy)


(load "pop3.lsp") ; Requires pop3.lsp V.1.5 from 7.0.2 or later

;; (ME:getpop) invokes (POP3:get-all-mail using this POP User info

;; These constants will be replaced by an INI file, or better yet

;; a self modifying code example :)


;(setq ME:pop-user-name   "your-account-name")

;(setq ME:password        "your-pop-password")

;(setq ME:pop-mail-server "your-pop-server")

;(setq ME:mail-dir        "your-mail-directory")


;; doit.lsp is a container I use for the loading of personal

;; and application related contexts and constants. This is also a

;; good place to put personalization (setq's) like the ones required above.


(if (and (file? "doit.lsp") (not ME:pop-user-name)) (load "doit.lsp"))

;; (ME:getpop) DOES NOT delete or remove the message from the server

;; so that an exsisting pop mail account can be used for testing without

;; any chance of message loss.


(define (ME:getpop)

  (if (and ME:pop-user-name ME:password ME:pop-mail-server ME:mail-dir)


        (print "nFetching Messages : ")

        (POP3:get-all-mail ME:pop-user-name ME:password ME:pop-mail-server ME:mail-dir)


     (print "nERROR: ME:pop-user-name, password, mail-server, and mail-dir (= (not (set :( n"))


;; eof

Bob the Caveguy aka Lord High Fixer.


I just put pop3.lsp v1.5 in:">//