sitefox.mail
Functions for sending email from web services using node-mailer.
send-email
(send-email to from subject & {:keys [transport headers text html]})
Send an email.
Uses the SMTP_SERVER
environment variable to configure the server to use for sending. For example: SMTP_SERVER=smtps://username:password@mail.someserver.com/?pool=true
If you don’t specify a server ethereal.email will be used and the viewing link will be returned in the url
property of the result. You can use this for testing your emails in dev mode.
to
andfrom
are valid email addresses.to
can be an array of valid email addresses for multiple recipients.subject
is the text of the subject line.- Use
:text
for the body of the email in text format. - Use
:html
for the body of the email in html format. - Use
:smtp-transport
keyword argument if you want to re-use the transport to send multiple emails. - Use
:headers
to pass a map of additional headers.
smtp-transport
(smtp-transport)
Create the SMTP mail transport to be used by send-email
.
The SMTP_SERVER
environment variable specifies the connection settings. If unset a test account at ethereal.email will be used.