TLSMode

public enum TLSMode

TLSMode enum for what form of connection security to enforce.

  • Upgrades the connection to TLS if STARTLS command is received, else sends mail without security.

    Declaration

    Swift

    case normal
  • Send mail over plaintext and ignore STARTTLS commands and TLS options. Could throw an error if server requires TLS.

    Declaration

    Swift

    case ignoreTLS
  • Only send mail after an initial successful TLS connection. Connection will fail if a TLS connection cannot be established. The default port, 587, will likely need to be adjusted depending on your server.

    Declaration

    Swift

    case requireTLS
  • Expect a STARTTLS command from the server and require the connection is upgraded to TLS. Will throw if the server does not issue a STARTTLS command.

    Declaration

    Swift

    case requireSTARTTLS