| Paste number 77461: | sending an email via bknr cl-smtp |
| Pasted by: | bobbysmith007 |
| When: | 10 months, 2 weeks ago |
| Share: | Tweet this! | http://paste.lisp.org/+1NRP |
| Channel: | None |
| Paste contents: |
;; A simplified version of the function we use to send a client an email
(defmethod send-client-email ((client adwolf-db:clients) subject body &key
attachments (to (adwolf-db:emailname client))
(from +from-address+) (server +mail-server+)
(is-html-p nil))
(let* ((type (if is-html-p "html" "plain"))
(cl-smtp::*content-type* #?"text/${type}; charset=\"UTF8\""))
(cl-smtp:send-email
server
from
(email-list-from-string to)
subject
body
:attachments attachments))Annotations for this paste:
| Annotation number 1: | Example of function and call |
| Pasted by: | bobbysmith007 |
| When: | 10 months, 2 weeks ago |
| Share: | Tweet this! | http://paste.lisp.org/+1NRP/1 |
| Paste contents: |
;; A simplified version of the function we use to send a client an email
(defun send-email (subject body to &key
attachments
(from +from-address+) (server +mail-server+)
(is-html-p nil))
(let* ((type (if is-html-p "html" "plain"))
(cl-smtp::*content-type* #?"text/${type}; charset=\"UTF8\""))
(cl-smtp:send-email
server
from
(email-list-from-string to)
subject
body
:attachments attachments)))
(send-email "test without patch" "<html><body><h2>test</h2></body></html>" "russ@acceleration.net" :attachments (list "mathpuzzel.pdf") :is-html-p T)