Commit ba8dec75 authored by Jan Idzikowski's avatar Jan Idzikowski
Browse files

add :cl-smtp-authentication for reader macro

parent 94405bf9
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
......
......@@ -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 @@ To use cl-smtp:
- 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 @@ You can change this with setting the parameter *x-mailer*
(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>
......@@ -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")
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment