diff options
| author | Teddy Wing | 2022-05-08 05:07:39 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2022-05-08 05:07:39 +0200 | 
| commit | 22461379250147870550d4d9cd43dc67f65892a9 (patch) | |
| tree | 8c9a66ff3c071868b86c81528c896c1e196f2130 /src/email.lisp | |
| parent | 8d98dd58afdbf659b6c246f158451cd8c850acb8 (diff) | |
| download | wajir-22461379250147870550d4d9cd43dc67f65892a9.tar.bz2 | |
Start of email building
Take a recipient email address. Build an email containing the issue
details.
Change the `run` loop to only operate on a single issue for testing
purposes.
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)))  | 
