|
|
@ -3,7 +3,7 @@
|
|
|
|
(define-condition sendgrid-error (error)
|
|
|
|
(define-condition sendgrid-error (error)
|
|
|
|
((sendgrid-error-message :initarg :sendgrid-error-message :reader sendgrid-error-message)))
|
|
|
|
((sendgrid-error-message :initarg :sendgrid-error-message :reader sendgrid-error-message)))
|
|
|
|
|
|
|
|
|
|
|
|
(defun send-email (&key api-user api-key subject to text html from reply-to)
|
|
|
|
(defun send-email (&key api-user api-key subject to text html from reply-to from-name)
|
|
|
|
(let ((r (parse (flexi-streams:octets-to-string
|
|
|
|
(let ((r (parse (flexi-streams:octets-to-string
|
|
|
|
(http-request "https://sendgrid.com/api/mail.send.json"
|
|
|
|
(http-request "https://sendgrid.com/api/mail.send.json"
|
|
|
|
:method :post
|
|
|
|
:method :post
|
|
|
@ -12,6 +12,7 @@
|
|
|
|
("subject" . ,subject)
|
|
|
|
("subject" . ,subject)
|
|
|
|
("to" . ,to)
|
|
|
|
("to" . ,to)
|
|
|
|
("replyto" . ,reply-to)
|
|
|
|
("replyto" . ,reply-to)
|
|
|
|
|
|
|
|
("fromname" . ,from-name)
|
|
|
|
("text" . ,text)
|
|
|
|
("text" . ,text)
|
|
|
|
("html" . ,html)
|
|
|
|
("html" . ,html)
|
|
|
|
("from" . ,from))))
|
|
|
|
("from" . ,from))))
|
|
|
|