(index ("api-user" 0) ("api-key" 116) ("api-version" 228) ("send-mail" 622))
(def (sig (parameter "(api-user user)" (id api-user))) (p "This is your SendGrid api user specified as a string."))
(def (sig (parameter "(api-key key)" (id api-key))) (p "This is your SendGrid api key specified as a string."))
(def (sig (parameter "(api-version version)" (id api-version))) (p "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.") (p "As far as this library's interface, the input and output are the same for both API versions."))
(def (sig (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)) files)" (id send-mail))) (p "Takes all the required arguments, passes a request on to SendGrid, and returns the SendGrid response in list form. " (tt "api-user") " and " (tt "api-key") " are optional if you specified them as parameters.") (p "Only " (tt "html") " or " (tt "text") " needs to be specified. If " (tt "html") " is specified, then the resulting email will be in HTML format. If both " (tt "html") " and " (tt "text") " are specified, then the resulting email will only include the contents of " (tt "html") ".") (p (tt "files") " is optional and is a list of alists containing file attachments. The alist for each file must contain the key " (tt "filename") " -- a string, " (tt "filepath") " -- a string, and " (tt "content-type") " -- a symbol. Example of " (tt "files") ":") (highlight scheme "(((filepath . \"/foo.txt\") (filename . \"foo.txt\") (content-type . text/plain)))"))
