PopClient class Null safety

Client to access POP3 compliant servers. Compare https://tools.ietf.org/html/rfc1939 for details.

Constructors

PopClient({EventBus? bus, bool isLogEnabled = false, String? logName, Duration? connectionTimeout, bool onBadCertificate(X509Certificate)?})
Set the eventBus to add your specific EventBus to listen to SMTP events. Set isLogEnabled to true to see log output. Set the logName for adding the name to each log entry. Set the connectionTimeout in case the connection connection should timeout automatically after the given time. onBadCertificate is an optional handler for unverifiable certificates. The handler receives the X509Certificate, and can inspect it and decide (or let the user decide) whether to accept the connection or not. The handler should return true to continue the SecureSocket connection.

Properties

connectionInfo ↔ ConnectionInfo
read / write, inherited
connectionTimeout Duration?
final, inherited
eventBus EventBus
Allows to listens for events [...]
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
isLogEnabled bool
read / write, inherited
isLoggedIn bool
read / write, inherited
isSocketClosingExpected bool
read / write, inherited
logName String?
read / write, inherited
onBadCertificate → (bool Function?(X509Certificate)?)
onBadCertificate is an optional handler for unverifiable certificates. The handler receives the X509Certificate, and can inspect it and decide (or let the user decide) whether to accept the connection or not. The handler should return true to continue the SecureSocket connection.
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
serverInfo PopServerInfo
write-only

Methods

closeConnection() Future
Closes the connection. Deprecated: use disconnect() instead.
@Deprecated('Use disconnect() instead')
connect(Socket socket, {ConnectionInfo? connectionInformation}) → void
Starts to liste on socket. [...]
inherited
connectToServer(String host, int port, {bool isSecure = true}) Future<ConnectionInfo>
Connects to the specified server. [...]
inherited
delete(int? messageId) Future<void>
Marks the message with the specified messageId as deleted
disconnect() Future<void>
inherited
list([int? messageId]) Future<List<MessageListing>>
Checks the ID and size of all messages or of the message with the specified messageId
log(dynamic logObject, {bool isClient = true, String? initial}) → void
inherited
login(String name, String password) Future<void>
Logs the user in with the default USER and PASS commands.
loginWithApop(String name, String password) Future<void>
Logs the user in with the APOP command.
noop() Future<void>
Keeps the connection alive
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
onConnectionDone() → void
inherited
onConnectionError(dynamic error) → void
onConnectionEstablished(ConnectionInfo connectionInfo, String serverGreeting) → void
onDataReceived(Uint8List data) → void
onServerResponse(List<String?> responseTexts) → void
quit() Future<void>
Ends the POP session and also removes any messages that have been marked as deleted
reset() Future<void>
Keeps any messages that are marked as deleted
retrieve(int? messageId) Future<MimeMessage>
Downloads the message with the specified messageId
retrieveTopLines(int messageId, int numberOfLines) Future<MimeMessage>
Downloads the first numberOfLines lines of the message with the messageId
sendCommand<T>(PopCommand<T> command) Future<T>
startTls() Future<void>
Upgrades the current insure connection to SSL. [...]
status() Future<PopStatus>
Checks the status ie the total number of messages and their size
toString() String
A string representation of this object. [...]
inherited
uidList([int? messageId]) Future<List<MessageListing>>
Checks the ID and UID of all messages or of the message with the specified messageId This command is optional and may not be supported by all servers.
upradeToSslSocket() Future<void>
inherited
writeData(List<int> data, [dynamic logObject]) Future
Writes the specified data. [...]
inherited
writeText(String text, [dynamic logObject]) Future
Writes the specified text. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited