Author: hhubner Date: 2006-11-25 12:01:21 -0500 (Sat, 25 Nov 2006) New Revision: 2084
Modified: trunk/projects/bos/m2/mail-generator.lisp Log: Remove duplicate Content-Type header that prevented sponsor data mail from being correctly displayed with Thunderbird.
Modified: trunk/projects/bos/m2/mail-generator.lisp =================================================================== --- trunk/projects/bos/m2/mail-generator.lisp 2006-11-24 14:43:21 UTC (rev 2083) +++ trunk/projects/bos/m2/mail-generator.lisp 2006-11-25 17:01:21 UTC (rev 2084) @@ -16,8 +16,8 @@ From: ~A To: ~A Subject: ~A -Content-Type: ~A -~@[~*~%~]~A" +~@[Content-Type: ~A +~]~@[~*~%~]~A" (format-date-time (get-universal-time) :mail-style t) *mail-sender* to @@ -151,27 +151,28 @@ :tel (param 'tel)))))
(defun mail-contract-data (contract type mime-parts) + (let ((parts mime-parts)) + (unless (contract-download-only-p contract) + (setf parts (append parts + (list (make-instance 'mime + :type "application" + :subtype (format nil "pdf; name="contract-~A.pdf"" (store-object-id contract)) + :encoding :base64 + :content (file-contents (contract-pdf-pathname contract :print t))))))) + (send-system-mail :to (contract-office-email contract) + :subject (format nil "~A-Spenderdaten - Sponsor-ID ~D Contract-ID ~D" + type + (store-object-id (contract-sponsor contract)) + (store-object-id contract)) + :content-type nil + :more-headers t + :text (with-output-to-string (s) + (print-mime s + (make-instance 'multipart-mime + :subtype "mixed" + :content parts) + t t)))) (unless (contract-download-only-p contract) - (push (make-instance 'mime - :type "application" - :subtype (format nil "pdf; name="contract-~A.pdf"" (store-object-id contract)) - :encoding :base64 - :content (file-contents (contract-pdf-pathname contract :print t))) - mime-parts)) - (send-system-mail :to (contract-office-email contract) - :subject (format nil "~A-Spenderdaten - Sponsor-ID ~D Contract-ID ~D" - type - (store-object-id (contract-sponsor contract)) - (store-object-id contract)) - :content-type "multipart/mixed" - :more-headers t - :text (with-output-to-string (s) - (print-mime s - (make-instance 'multipart-mime - :subtype "mixed" - :content mime-parts) - t t))) - (unless (contract-download-only-p contract) (delete-file (contract-pdf-pathname contract :print t))))
(defun mail-manual-sponsor-data (req)