diff options
Diffstat (limited to 'src/email.lisp')
-rw-r--r-- | src/email.lisp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/email.lisp b/src/email.lisp new file mode 100644 index 0000000..c877eda --- /dev/null +++ b/src/email.lisp @@ -0,0 +1,20 @@ +(in-package :wajir) + +(defun deliver-email (recipient issue) + (cl-smtp:write-rfc8822-message + *standard-output* + (format nil "wajir@~A" (uiop:hostname)) + `(,recipient) + (format-subject issue) + (format-description issue))) + +(defun format-subject (issue) + (format nil + "[JIRA] (~A) ~A" + (gethash "key" issue) + (gethash "summary" + (gethash "fields" issue)))) + +(defun format-description (issue) + (gethash "description" + (gethash "fields" issue))) |