The sendgrid Reference Manual

This is the sendgrid Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed May 15 04:28:34 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 sendgrid

Wrapper to SendGrid’s API.

Author

vindarel

License

MIT

Version

0.1

Dependencies
  • dexador (system).
  • jonathan (system).
Source

sendgrid.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 sendgrid/src

Source

sendgrid.asd.

Parent Component

sendgrid (system).

Child Component

sendgrid.lisp (file).


4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 sendgrid/sendgrid.asd

Source

sendgrid.asd.

Parent Component

sendgrid (system).

ASDF Systems

sendgrid.


4.1.2 sendgrid/src/sendgrid.lisp

Source

sendgrid.asd.

Parent Component

src (module).

Packages

sendgrid.

Public Interface
Internals

5 Packages

Packages are listed by definition order.


5.1 sendgrid

Source

sendgrid.lisp.

Use List

common-lisp.

Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Special variables

Special Variable: *api-key-environment-variable-name*
Package

sendgrid.

Source

sendgrid.lisp.

Special Variable: *verbose*
Package

sendgrid.

Source

sendgrid.lisp.


6.1.2 Ordinary functions

Function: now-plus-n-days (days)

Sendgrid api allows you to send emails up to 3 days (72 hours) in the future

Specify n days in the future where n is either 1, 2, or 3 days.

A unix time for that date will be returned. If any other number of days is provided, the now function will return.

Package

sendgrid.

Source

sendgrid.lisp.

Function: send-email (&rest rest &key to from subject content reply-to content-type api-key &allow-other-keys)

Send an email with SendGrid’s API. https://docs.sendgrid.com/api-reference/mail-send/mail-send#body Currently only supporting basic parameters for 80% use cases.

Notice that ‘reply-to’, if not nil, should be an alist as (("email" . string) ("name" . string))

Package

sendgrid.

Source

sendgrid.lisp.


6.2 Internals


6.2.1 Special variables

Special Variable: *one-day-in-seconds*

one day less 1000 seconds

Package

sendgrid.

Source

sendgrid.lisp.

Special Variable: *sendgrid-api*
Package

sendgrid.

Source

sendgrid.lisp.


6.2.2 Ordinary functions

Function: ensure-list (list)

If LIST is a list, it is returned. Otherwise returns the list designated by LIST. (from Alexandria)

Package

sendgrid.

Source

sendgrid.lisp.

Function: now ()

Unix time now

Package

sendgrid.

Source

sendgrid.lisp.

Function: sendgrid-json (&key to from from-name reply-to subject send-at content-type content-value &allow-other-keys)

Build the data json.
‘to’: one email address or a list.
‘reply-to’: a pair of email and name.
‘from’: the sending email
‘from-name’: the sending name that shows up in the inbox

Package

sendgrid.

Source

sendgrid.lisp.


Appendix A Indexes


A.1 Concepts