cl-sendgrid

2022-07-08

Wrapper to SendGrid's API.

Upstream URL

github.com/vindarel/cl-sendgrid

Author

vindarel

License

MIT
README

Send emails with the SendGrid API

https://sendgrid.com/

On Quicklisp (2020-10):

(ql:quickload "sendgrid")

and on Ultralisp.

Create an account an set these variables:

(setf *email-config*
  '(:|api-key| "your private api key"
    :|from| "the default 'from' address."))

Send an email with send-email:

(sendgrid:send-email &key to
                          (from (getf *email-config* :|from|))
                          (reply-to (getf *email-config* :|reply-to|))
                          subject
                          content
                          (verbose *verbose*))

;; #()
;; 202
;; #<HASH-TABLE :TEST EQUAL :COUNT 10 {10079655A3}>
;; #<QURI.URI.HTTP:URI-HTTPS https://api.sendgrid.com/v3/mail/send>
;; #<CL+SSL::SSL-STREAM for #<FD-STREAM for "socket 192.168.1.11:36670, peer: 159.122.xxx.yyy:443" {1007880183}>>

It takes the time of a POST request.

TODO:

  • make the "to" parameter accept a list of addresses.
  • add "reply_to". It is a cons cell / a list with: an email address, a name.

See also

Licence

MIT.

Dependencies (2)

  • dexador
  • jonathan

Dependents (0)

    • GitHub
    • Quicklisp