Update of /project/cl-smtp/cvsroot/cl-smtp In directory common-lisp.net:/tmp/cvs-serv14910
Modified Files: CHANGELOG README cl-smtp.asd cl-smtp.lisp Log Message: add :cl-smtp-authentication for reader macro
Date: Sun Dec 11 21:45:54 2005 Author: jidzikowski
Index: cl-smtp/CHANGELOG diff -u cl-smtp/CHANGELOG:1.2 cl-smtp/CHANGELOG:1.3 --- cl-smtp/CHANGELOG:1.2 Sat Dec 10 22:00:10 2005 +++ cl-smtp/CHANGELOG Sun Dec 11 21:45:54 2005 @@ -1,8 +1,15 @@ +Version 20051211.1 +2005-12-11 +add :cl-smtp-authentication for reader macro, that you can use cl-smtp with and +without authentication support +Change cl-smtp.asd, cl-smtp.lisp, README, CHANGELOG + Version 20051210.1 2005-12-10 "ADD" key authentication for smtp authentication: '(:plain "username" "password") or '(:login "username" "password") add dependency to CL-BASE64 except allegro +Change cl-smtp.asd, cl-smtp.lisp, CHANGELOG
Version 20050729.1 2005-07-29
Index: cl-smtp/README diff -u cl-smtp/README:1.1.1.1 cl-smtp/README:1.2 --- cl-smtp/README:1.1.1.1 Tue Nov 1 19:34:57 2005 +++ cl-smtp/README Sun Dec 11 21:45:54 2005 @@ -2,14 +2,24 @@ CL-SMTP is a simple lisp smtp client. It works in ACL, SBCL, CMUCL, OPENMCL, LISPWORKS and CLISP.
+new with authentication support for PLAIn and LOGIN authentication method + See INSTALL for prerequisites and build details.
To use cl-smtp:
(asdf:operate 'asdf:load-op 'cl-smtp)
+For use cl-smtp with authentication support you need cl-base64 package and +add :cl-smtp-authentication to features + +(push :cl-smtp-authentication *features*) +(asdf:operate 'asdf:load-op 'cl-smtp) + +------------------------------------------------ + (cl-smtp:send-email host from to subject message - &key (port 25) cc bcc reply-to extra-headers) + &key (port 25) cc bcc reply-to extra-headers authentication)
Arguments: - host (String) : hostname or ip-adress of the smtpserver @@ -21,8 +31,11 @@ - cc (String or Cons of Strings) : email adress carbon copy - bcc (String or Cons of Strings): email adress blind carbon copy - reply-to (String) : email adress - - diplayname (String) : diplayname of the sender + - displayname (String) : displayname of the sender - extra-headers (Cons) : extra headers as alist + - authentication (Cons) : list with 3 elements + (:method "username" "password") + method is a keyword :plain or :login
Returns nil or error with message
@@ -36,4 +49,4 @@ (setf cl-smtp::*x-mailer* "my x-mailer string)
If you find bugs or want to send patches for enhancements, by email to -Jan Idzikowski ji@neumond.net. +Jan Idzikowski jidzikowski@common-lisp.net
Index: cl-smtp/cl-smtp.asd diff -u cl-smtp/cl-smtp.asd:1.2 cl-smtp/cl-smtp.asd:1.3 --- cl-smtp/cl-smtp.asd:1.2 Sat Dec 10 22:00:10 2005 +++ cl-smtp/cl-smtp.asd Sun Dec 11 21:45:54 2005 @@ -26,9 +26,12 @@ (in-package :cl-smtp)
(asdf:defsystem :cl-smtp - :version "20051210.1" - :depends-on - (#-allegro :cl-base64) + :version "20051211.1" + :depends-on + #+(and cl-smtp-authentication (not allegro)) + (:cl-base64) + #-cl-smtp-authentication + () :components (#+sbcl(:file "sbcl") #+allegro(:file "acl")
Index: cl-smtp/cl-smtp.lisp diff -u cl-smtp/cl-smtp.lisp:1.2 cl-smtp/cl-smtp.lisp:1.3 --- cl-smtp/cl-smtp.lisp:1.2 Sat Dec 10 22:00:10 2005 +++ cl-smtp/cl-smtp.lisp Sun Dec 11 21:45:54 2005 @@ -58,8 +58,10 @@ resultstr))
(defun string-to-base64-string (str) - #+allegro (excl:string-to-base64-string str) - #-allegro (cl-base64:string-to-base64-string str)) + (declare (ignorable str)) + #+(and cl-smtp-authentication allegro) (excl:string-to-base64-string str) + #+(and cl-smtp-authentication (not allegro)) + (cl-base64:string-to-base64-string str))
(defun send-email (host from to subject message @@ -76,6 +78,9 @@ (defun send-smtp (host from to subject message &key (port 25) cc bcc reply-to extra-headers display-name authentication) + #-cl-smtp-authentication + (when authentication + (error "cl-smtp was not compiled with authentication support, push :cl-smtp-authentication to *features* bevor load cl-smtp.asd")) (let ((sock (socket-stream (make-smtp-socket host port)))) (unwind-protect (progn