LINUX.ORG.RU
Ответ на: комментарий от anonymous

эмммммм что то не получается.... вот код в нём ругается на Blob-type

(asdf:oos 'asdf:load-op :cl+ssl)
(asdf:oos 'asdf:load-op :cl-smtp)
(asdf:oos 'asdf:load-op :cl-mime)
(asdf:oos 'asdf:load-op :cl-BASE64)
(asdf:oos 'asdf:load-op :arnesi) 
(asdf:oos 'asdf:load-op :cl-prevalence)

(deftype blob-type ()
  '(simple-array (unsigned-byte 8) (*)))
  
(defun Отправить ()
	(with-open-file (поток-текста "C:/lisp/sbcl/Текст.txt")
		(setf Текст (read поток-текста)))
	(with-open-file (поток-рецепиентов "C:/lisp/sbcl/Рецепиенты.txt")
		(setf *Колличество-потоков* (read поток-рецепиентов))
		(loop for и from 1 upto *Колличество-потоков*
			do(send-email Текст(read поток-рецепиентов)))))

(defun send-email (text &rest reciepients)
  "Generic send SMTP mail with some TEXT to RECIEPIENTS"
  (cl-smtp:with-smtp-mail (out "Хост"  "Имя" reciepients :port 465 :authentication  (List "логин" "пароль") :local-hostname "логин")
    (cl-mime:print-mime out
	(make-instance
        'cl-mime:multipart-mime
        :subtype "mixed"
        :content (list
		(make-instance
                   'cl-mime:mime
                   :type "image"
                   :subtype (string-downcase (symbol-name ([u]blob-type[/u] "E:\666.JPG")))
                   :encoding :base64
                   :content (flexi-streams:with-output-to-sequence (s)
                              (blob-to-stream "E:\666.JPG" s)))
		(make-instance 'cl-mime:mime
			:type "text"
            :encoding :base64
            :charset "UTF-8"
            :content (arnesi:string-to-octets text :utf-8))))
		#|(make-instance 'cl-mime:text-mime
            :encoding :base64
            :charset "UTF-8"
            :content (arnesi:string-to-octets text :utf-8))|#
      t t)))

RusNekromant
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.