Send Grid

  1. Send Grid
    1. Description
    2. Repository
    3. Author
    4. Requirements
    5. List of Parameters
      1. api-user
      2. api-key
    6. List of Procedures
      1. send-mail
    7. Example
    8. Version History
      1. Version 2
      2. Version 1

Description

Provides a very simply api for sending email via SendGrid. The api uses SendGrid's web api. Currently only the sending of mail is supported, but other parts of the web api could be easily added.

Repository

https://github.com/ThomasHintz/chicken-scheme-send-grid

Author

Thomas Hintz

Contact me at t@thintz.com.

Requirements

List of Parameters

api-user

[parameter] (api-user user)

This is your SendGrid api user specified as a string.

api-key

[parameter] (api-key key)

This is your SendGrid api key specified as a string.

List of Procedures

send-mail

[procedure] (send-mail #!key (subject #f) (text #f) (html #f) (from #f) (from-name #f) (to #f) (reply-to #f) (api-user (api-user)) (api-key (api-key)))

Takes all the required arguments, passes a request on to SendGrid, and returns the SendGrid response in list form. api-user and api-key are optional if you specified them as parameters.

Only html or text needs to be specified. If html is specified, then the resulting email will be in HTML format. If both html and text are specified, then the resulting email will only include the contents of html.

Example

(use send-grid)

(api-user "api-user")
(api-key "api-key")

(send-mail from: "example.from@example.org" to: "example.to@example.org" from-name: "Example Name" reply-to: "example-from@example.org" subject: "Example Subject" text: "Example text.")

Version History

Version 2

Fix some install bugs.

Version 1

Initial release.