klyn.mails.Transport.deliver
method
public static deliver(message as MimeMessage, session as Session = null) as SmtpResponse throws MessagingException:
Description

Sends a message using either the provided session or the session attached to the message itself.

import klyn.mails

session = Session.smtp("smtp.example.com")
message = MimeMessage(session)
Throws
  • MessagingException if message validation, MIME rendering, SMTP connection, SMTP command exchange, or delivery fails.