(connect)
(connect smtp-server)
Connect to the specified SMTP server.
If the connection is successful, an open SMTPConnection
is returned.
smtp-server
is a map containing following keys. (kebab-case is allowed)
For more information, please see https://jakarta.ee/specifications/mail/1.6/apidocs/com/sun/mail/smtp/package-summary.html
Connect to the specified SMTP server. If the connection is successful, an open `SMTPConnection` is returned. `smtp-server` is a map containing following keys. (kebab-case is allowed) * :host * :port * :user * :password * :ssl.enable * :starttls.enable For more information, please see https://jakarta.ee/specifications/mail/1.6/apidocs/com/sun/mail/smtp/package-summary.html
(close this)
Close this connection.
Close this connection.
(connected? this)
Return true if this connection is open.
Return true if this connection is open.
(send! this message)
Send a message.
message
is a map containing following keys.
:from
, :to
, :subject
and :body
are REQUIRED.:content-type
, :multipart
and :message-id-fn
are OPTIONAL.:content-type
is used when :body
is a String. (Default: "text/plain")
:multipart
is a String to specify multipart type. (Default: "mixed")
"mixed" and "alternative" are allowed.
:body
should be one of String or map list.
String body will be handled as "text message".
When you'd like to use multipart, you should specify body as map list.
Map formatted body should contain following keys.
:content
is REQUIRED.:content-type
and :id
is OPTIONAL.String :content
will be handled as "text message" while others are handled as "attachment file".
If you don't specify :content-type
, tarayo will detect it using Apache Tika automatically.
Containing :id
will be handled as "inline attachment file".
:message-id-fn
is a function to generate custom Message-ID.
No arguments are passed.
Send a message. `message` is a map containing following keys. * `:from`, `:to`, `:subject` and `:body` are REQUIRED. * `:content-type`, `:multipart` and `:message-id-fn` are OPTIONAL. ## Content-type `:content-type` is used when `:body` is a String. (Default: "text/plain") ## Multipart `:multipart` is a String to specify multipart type. (Default: "mixed") "mixed" and "alternative" are allowed. ## Body `:body` should be one of String or map list. String body will be handled as "text message". When you'd like to use multipart, you should specify body as map list. Map formatted body should contain following keys. * `:content` is REQUIRED. * `:content-type` and `:id` is OPTIONAL. String `:content` will be handled as "text message" while others are handled as "attachment file". If you don't specify `:content-type`, tarayo will detect it using Apache Tika automatically. Containing `:id` will be handled as "inline attachment file". ## Message-id-fn `:message-id-fn` is a function to generate custom Message-ID. No arguments are passed.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close