Sets the JavaMail session to the Mailer and returns the instance ready to send e-mail messages.
Sets the JavaMail session to the Mailer and returns the instance ready to send e-mail messages. Optionally, transport method can be explicitly specified.
JavaMail session
transport method (optional)
Mailer instance
Mailer object providing default operations to handle the transport connection and send the e-mail message.