January 2018
Intermediate to advanced
336 pages
7h 56m
English
Postal (https://github.com/drewr/postal) is a Clojure library that allows sending email. It requires SMTP connection details and the message as a map containing the required details of to, from, cc, subject, and body to send as an email. Postal can be used within the Pedestal interceptor to send an email if the required fields are validated and present in the context, as shown here:
(ns helping-hands.alert.core "Initializes Helping Hands Alert Service" (:require [cheshire.core :as jp] [clojure.string :as s] [postal.core :as postal] [helping-hands.alert.persistence :as p] [io.pedestal.interceptor.chain :as chain]) (:import [java.io IOException] [java.util UUID]));; -------------------------------- ...
Read now
Unlock full access