ME:getpop example aka (ME1.lsp)

Featuring the Dragonfly web framework
Locked
CaveGuy
Posts: 112
Joined: Sun Oct 13, 2002 3:00 pm
Location: Columbus Ohio
Contact:

ME:getpop example aka (ME1.lsp)

Post by CaveGuy »

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.

<pre>
;; 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)
(begin
(print "\nFetching Messages : ")
(POP3:get-all-mail ME:pop-user-name ME:password ME:pop-mail-server ME:mail-dir)
(POP3:log-off))
(print "\nERROR: ME:pop-user-name, password, mail-server, and mail-dir (= (not (set :( \n"))
'Done)

;; eof
</pre>
Last edited by CaveGuy on Sat Oct 26, 2002 8:16 pm, edited 1 time in total.
Bob the Caveguy aka Lord High Fixer.

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

I just put pop3.lsp v1.5 in:

http://newlisp.org/download/development/pop3.lsp


Lutz

Locked