doesn't have built-in @acronym{TLS} support.
@item :warn-unless-encrypted @var{boolean}
-If non-@code{nil}, and @code{:return-value} is also non-@code{nil},
-Emacs will warn if the connection isn't encrypted. This is useful for
-protocols like @acronym{IMAP} and the like, where most users would
-expect the network traffic to be encrypted.
+If non-@code{nil}, warn the user if the final connection type is not
+encrypted. This is useful for protocols like @acronym{IMAP} and the
+like, where most users would expect the network traffic to be encrypted.
+This may be due to @acronym{STARTTLS} upgrade failure, specifying
+@code{:return-list} non-@code{nil} allows you to capture any error
+encountered.
@vindex network-stream-use-client-certificates
@item :client-certificate @var{list-or-t}
If non-@code{nil}, the host's capability string.
@item :type @var{symbol}
The connection type: @samp{plain} or @samp{tls}.
+@item :error @var{symbol}
+A string describing any error encountered when perfoming
+@acronym{STARTTLS} upgrade.
@end table
@item :shell-command @var{string-or-nil}
used to decode and encode the data which the process reads and
writes. See `make-network-process' for details.
-:return-list specifies this function's return value.
- If omitted or nil, return a process object. A non-nil means to
- return (PROC . PROPS), where PROC is a process object and PROPS
- is a plist of connection properties, with these keywords:
+:return-list controls the form of the function's return value.
+ If omitted or nil, return a process object. Anything else means to
+ return (PROC . PROPS), where PROC is a process object, and PROPS is a
+ plist of connection properties, which may include the following
+ keywords:
:greeting -- the greeting returned by HOST (a string), or nil.
:capabilities -- a string representing HOST's capabilities,
or nil if none could be found.
:type -- the resulting connection type; `plain' (unencrypted)
or `tls' (TLS-encrypted).
+ :error -- A string describing any error when attempting
+ to negotiate STARTTLS.
:end-of-command specifies a regexp matching the end of a command.
:use-starttls-if-possible is a boolean that says to do opportunistic
STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality.
-:warn-unless-encrypted is a boolean which, if :return-list is
-non-nil, is used warn the user if the connection isn't encrypted.
+:warn-unless-encrypted, if non-nil, warn the user if the connection
+isn't encrypted (i.e. STARTTLS failed). Additionally, setting
+:return-list non-nil allows capturing any error response.
:nogreeting is a boolean that can be used to inhibit waiting for
a greeting from the server.