MailAccount class
Contains information about a single mail account
Constructors
- MailAccount.new()
- Creates a new empty mail account
Properties
-
aliases
↔ List<
MailAddress> ? -
Optional list of associated aliases
getter/setter pair
-
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:
no setterinherited
- email ↔ String?
-
The email address of the user
getter/setter pair
- fromAddress → MailAddress
-
Convenience getter for the from MailAddress
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- incoming ↔ MailServerConfig?
-
Incoming mail settings
getter/setter pair
- name ↔ String?
-
The name of the account
getter/setter pair
-
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.
no setterinherited
- outgoing ↔ MailServerConfig?
-
Outgoing mail settings
getter/setter pair
- outgoingClientDomain ↔ String
-
The domain that is reported to the outgoing SMTP service
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- supportsPlusAliases ↔ bool
-
Optional indicator if the mail service supports + based aliases, e.g.
user+alias@domain.com
.getter/setter pair -
transformers
→ Map<
String, dynamic Function(dynamic)> -
Define any transformations for values.
You can transform an enumeration to an int and the other way round:
no setterinherited
- userName ↔ String?
-
The associated name of the user such as
user@domain.com
getter/setter pair
Methods
-
hasAttribute(
String name) → bool - Checks if this account has an attribute with the specified name
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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 specifiedemail
from the discoveredconfig
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 discoveredconfig
with the givenauth
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
auth
entication. -
getUserName(
String email, ServerConfig serverConfig) → String -
Retrieves the user name from the given
email
and the discoveredserverConfig
, defaulting to the email when the serverConfig does not contain any rules.