This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.
If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.
Contact me at firstname.lastname@example.org.
- api-user userparameter
This is your SendGrid api user specified as a string.
- api-key keyparameter
This is your SendGrid api key specified as a string.
- api-version versionparameter
A string indicating the SendGrid API version to use. The default is "2". Version "3" is also supported. After December 9th, 2020, this library may set the default to "3" when support for version 2 is officially ended.
As far as this library's interface, the input and output are the same for both API versions.
- (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)) files)procedure
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.
files is optional and is a list of alists containing file attachments. The alist for each file must contain the key filename -- a string, filepath -- a string, and content-type -- a symbol. Example of files:
(((filepath . "/foo.txt") (filename . "foo.txt") (content-type . text/plain)))
(use send-grid) (api-user "api-user") (api-key "api-key") (send-mail from: "email@example.com" to: "firstname.lastname@example.org" from-name: "Example Name" reply-to: "email@example.com" subject: "Example Subject" text: "Example text.")
Adding backwards compatible support for SendGrid API version 3.
Add support for file attachments. (Thanks to Sven Hartrumpf)
Fix some install bugs.