Changeset 2831

Show
Ignore:
Timestamp:
03/31/08 08:15:40 (9 months ago)
Author:
hans
Message:

Move BOS project to using CL-SMTP

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/projects/bos/m2/mail-generator.lisp

    r2484 r2831  
    1515 
    1616(defun send-system-mail (&key (to *office-mail-address*) (subject "(no subject") (text "(no text)") (content-type "text/plain; charset=UTF-8") more-headers) 
     17  (setf to (alexandria:ensure-list to)) 
    1718  (if *enable-mails* 
    18       (send-smtp "localhost" *mail-sender* to 
    19                 (format nil "X-Mailer: BKNR-BOS-mailer 
     19      (cl-smtp:with-smtp-mail (smtp "localhost" *mail-sender* to) 
     20        (format smtp "X-Mailer: BKNR-BOS-mailer 
    2021Date: ~A 
    2122From: ~A 
    22 To: ~A 
     23To: ~{~A~^, ~} 
    2324Subject: ~A 
    2425~@[Content-Type: ~A 
    2526~]~@[~*~%~]~A" 
    26                         (format-date-time (get-universal-time) :mail-style t) 
    27                         *mail-sender* 
    28                         to 
    29                         subject 
    30                         content-type 
    31                         (not more-headers) 
    32                         text)) 
     27                (format-date-time (get-universal-time) :mail-style t) 
     28                *mail-sender* 
     29                to 
     30                subject 
     31                content-type 
     32                (not more-headers) 
     33                text)) 
    3334      (format t "Mail with subject ~S to ~A not sent~%" subject to))) 
    3435   
  • trunk/projects/bos/web/spendenquittung.lisp

    r2343 r2831  
    128128 
    129129    (handler-case 
    130         (send-smtp "localhost" *mail-sender-address* email 
    131                   (format nil "From: ~a <~a>~%To: ~a <~a>~%Subject: Ihre Spendenbescheinigung fÃŒr den Quadratmeterkauf~%" 
    132                           *mail-sender-name* *mail-sender-address* 
    133                           name email) 
     130        (cl-smtp:with-smtp-mail (smtp "localhost" *mail-sender-address* email) 
     131          (format smtp "From: ~a <~a>~%To: ~a <~a>~%Subject: Ihre Spendenbescheinigung fÃŒr den Quadratmeterkauf~%" 
     132                  *mail-sender-name* *mail-sender-address* 
     133                  name email) 
    134134                   (with-output-to-string (s) 
    135135                     (print-mime s mime t nil)))