MailAccount class Null safety

Contains information about a single mail account

Inheritance

Constructors

MailAccount()
Creates a new empty mail account

Properties

aliases List<MailAddress>?
Optional list of associated aliases
read / write
attributes Map<String, dynamic>
Holds all values that should be serialized. Can either be generated upon demand or used all the time. Example for using attributes as the data store: [...]
read-only, inherited
email String?
The email address of the user
read / write
fromAddress MailAddress
Convenience getter for the from MailAddress
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
incoming MailServerConfig?
Incoming mail settings
read / write
name String?
The name of the account
read / write
objectCreators Map<String, dynamic Function(Map<String, dynamic>?)>
Define functions that create new complex serializable or Map instances for nested objects. You can evaluate the provided map value to select a specific subclass, if needed. [...]
read-only, inherited
outgoing MailServerConfig?
Outgoing mail settings
read / write
outgoingClientDomain String
The domain that is reported to the outgoing SMTP service
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
supportsPlusAliases bool
Optional indicator if the mail service supports + based aliases, e.g. user+alias@domain.com.
read / write
transformers Map<String, dynamic Function(dynamic)>
Define any transformations for values. You can transform an enumeration to an int and the other way round: [...]
read-only, inherited
userName String?
The associated name of the user such as user@domain.com
read / write

Methods

hasAttribute(String name) bool
Checks if this account has an attribute with the specified name
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
override

Operators

operator ==(Object o) bool
The equality operator. [...]
override

Static Methods

fromDiscoveredSettings(String name, String email, String password, ClientConfig config, {String? userName, String outgoingClientDomain = 'enough.de'}) MailAccount
Creates a mail account with the given name for the user with the specified email from the discovered config with a a plain authentication for the preferred incoming and preferred outgoing server. [...]
fromDiscoveredSettingsWithAuth(String name, String email, MailAuthentication auth, ClientConfig config, {String outgoingClientDomain = 'enough.de', MailAuthentication? outgoingAuth}) MailAccount
Creates a mail account with the given name from the discovered config with the given auth for the preferred incoming and preferred outgoing server. [...]
fromManualSettings(String name, String email, String incomingHost, String outgoingHost, String password, {ServerType incomingType = ServerType.imap, ServerType outgoingType = ServerType.smtp, String? userName, String outgoingClientDomain = 'enough.de', dynamic incomingPort = 993, dynamic outgoingPort = 465, SocketType incomingSocketType = SocketType.ssl, SocketType outgoingSocketType = SocketType.ssl}) MailAccount
Creates a mail account from manual settings with a simple user-name/password authentication. [...]
fromManualSettingsWithAuth(String name, String email, String incomingHost, String outgoingHost, MailAuthentication auth, {ServerType incomingType = ServerType.imap, ServerType outgoingType = ServerType.smtp, MailAuthentication? outgoingAuth, String outgoingClientDomain = 'enough.de', dynamic incomingPort = 993, dynamic outgoingPort = 465, SocketType incomingSocketType = SocketType.ssl, SocketType outgoingSocketType = SocketType.ssl}) MailAccount
Creates a mail account from manual settings with the specified authentication. [...]
getUserName(String email, ServerConfig serverConfig) String
Retrieves the user name from the given email and the discovered serverConfig, defaulting to the email when the serverConfig does not contain any rules.