[cl-smtp-cvs] CVS cl-smtp
jidzikowski
jidzikowski at common-lisp.net
Tue Sep 4 18:54:08 UTC 2007
Update of /project/cl-smtp/cvsroot/cl-smtp
In directory clnet:/tmp/cvs-serv31855
Modified Files:
CHANGELOG INSTALL README cl-smtp.asd cl-smtp.lisp
Removed Files:
acl.lisp clisp.lisp cmucl.lisp lispworks.lisp openmcl.lisp
sbcl.lisp
Log Message:
Remove implementation dependent sockets code by adding usocket dependency.
--- /project/cl-smtp/cvsroot/cl-smtp/CHANGELOG 2006/04/04 13:04:40 1.5
+++ /project/cl-smtp/cvsroot/cl-smtp/CHANGELOG 2007/09/04 18:54:06 1.6
@@ -1,3 +1,10 @@
+Version 20070628.1
+2007-06-28
+Remove implementation dependent sockets code by adding usocket dependency.
+Change cl-smtp.asd cl-smtp.lisp README INSTALL
+ (remove acl.lisp clisp.lisp cmucl.lisp sbcl.lisp lispworks.lisp openmcl.lisp)
+
+
Version 20060404.1
2006-04-04
"ADD" support for attachment, thanks Brian Sorg for the implementation
--- /project/cl-smtp/cvsroot/cl-smtp/INSTALL 2005/11/01 18:34:57 1.1.1.1
+++ /project/cl-smtp/cvsroot/cl-smtp/INSTALL 2007/09/04 18:54:06 1.2
@@ -1,10 +1,12 @@
-CL-SMTP works in ACL, SBCL, CMUCL, OPENMCL, LISPWORKS and CLISP.
+CL-SMTP works in all implementations supported by its dependencies.
-For SBCL you need sb-bsd-sockets.
+For all implementations you'll need usocket
+and cl-base64 (the latter isn't a requirement on ACL).
CL-SMTP has a asdf system definition file.
-load this file:
+
+To load this file:
(asdf:operate 'asdf:load-op 'cl-smtp)
--- /project/cl-smtp/cvsroot/cl-smtp/README 2006/05/24 10:46:22 1.5
+++ /project/cl-smtp/cvsroot/cl-smtp/README 2007/09/04 18:54:06 1.6
@@ -1,12 +1,12 @@
CL-SMTP is a simple lisp smtp client.
-It works in ACL, SBCL, CMUCL, OPENMCL, LISPWORKS and CLISP.
+It works in ACL, SBCL, CMUCL, OPENMCL, LISPWORKS, CLISP and ECL.
new with support for send attachments, thanks Brian Sorg for the implementation
with authentication support for PLAIN and LOGIN authentication method
-used CL-BASE64 package
+used cl-base64 and usocket packages (cl-base64 isn't a requirement on ACL)
See INSTALL for prerequisites and build details.
--- /project/cl-smtp/cvsroot/cl-smtp/cl-smtp.asd 2006/04/04 13:04:40 1.6
+++ /project/cl-smtp/cvsroot/cl-smtp/cl-smtp.asd 2007/09/04 18:54:06 1.7
@@ -20,32 +20,16 @@
(:use :cl :asdf)
(:export :send-email))
-#+sbcl (require :sb-bsd-sockets)
+(in-package :cl-smtp)
+(defparameter *debug* nil)
-(in-package :cl-smtp)
+(defmacro print-debug (str)
+ `(when *debug*
+ (print ,str)))
(asdf:defsystem :cl-smtp
- :version "20060404.1"
- :depends-on
- #-allegro (:cl-base64)
- #+allegro ()
- :components
- (#+sbcl(:file "sbcl")
- #+allegro(:file "acl")
- #+cmu(:file "cmucl")
- #+clisp(:file "clisp")
- #+openmcl(:file "openmcl")
- #+lispworks(:file "lispworks")
- (:file "cl-smtp" :depends-on #+sbcl("sbcl")
- #+allegro("acl")
- #+cmu("cmucl")
- #+clisp("clisp")
- #+openmcl("openmcl")
- #+lispworks("lispworks"))
- (:file "attachments" :depends-on #+sbcl("sbcl")
- #+allegro("acl")
- #+cmu("cmucl")
- #+clisp("clisp")
- #+openmcl("openmcl")
- #+lispworks("lispworks"))))
+ :version "20070904.1"
+ :depends-on (:usocket #-allegro :cl-base64)
+ :components ((:file "cl-smtp" :depends-on ("attachments"))
+ (:file "attachments")))
--- /project/cl-smtp/cvsroot/cl-smtp/cl-smtp.lisp 2006/04/04 13:04:40 1.5
+++ /project/cl-smtp/cvsroot/cl-smtp/cl-smtp.lisp 2007/09/04 18:54:06 1.6
@@ -18,15 +18,10 @@
(in-package :cl-smtp)
-(defparameter *debug* nil)
(defparameter *x-mailer* (format nil "(~A ~A)"
(lisp-implementation-type)
(lisp-implementation-version)))
-(defmacro print-debug (str)
- `(when *debug*
- (print ,str)))
-
(defun check-arg (arg name)
(cond
((or (stringp arg)
@@ -83,7 +78,7 @@
(defun send-smtp (host from to subject message
&key (port 25) cc bcc reply-to extra-headers
display-name authentication attachments buffer-size)
- (let ((sock (socket-stream (make-smtp-socket host port)))
+ (let ((sock (usocket:socket-stream (usocket:socket-connect host port)))
(boundary (make-random-boundary)))
(unwind-protect
(progn
@@ -153,7 +148,7 @@
(error "wrong response from smtp server: ~A" msgstr)))
(cond
(authentication
- (write-to-smtp sock (format nil "EHLO ~A" (get-host-name)))
+ (write-to-smtp sock (format nil "EHLO ~A" (usocket::get-host-name)))
(multiple-value-bind (code msgstr)
(read-from-smtp sock)
(when (/= code 250)
@@ -189,7 +184,7 @@
(error "authentication ~A is not supported in cl-smtp"
(car authentication)))))
(t
- (write-to-smtp sock (format nil "HELO ~A" (get-host-name)))
+ (write-to-smtp sock (format nil "HELO ~A" (usocket::get-host-name)))
(multiple-value-bind (code msgstr)
(read-from-smtp sock)
(when (/= code 250)
@@ -201,8 +196,7 @@
(write-to-smtp sock (format nil "RCPT TO:<~A>" to))
(multiple-value-bind (code msgstr)
(read-from-smtp sock)
- (when (/= code 250)
-
+ (when (/= code 250)
(error "in RCPT TO command: ~A" msgstr)))))
More information about the Cl-smtp-cvs
mailing list