MailAccount.fromManualSettings constructor
MailAccount.fromManualSettings({
- required String name,
- required String email,
- required String incomingHost,
- required String outgoingHost,
- required String password,
- String userName = '',
- ServerType incomingType = ServerType.imap,
- ServerType outgoingType = ServerType.smtp,
- String? loginName,
- String outgoingClientDomain = 'enough.de',
- int incomingPort = 993,
- int outgoingPort = 465,
- SocketType incomingSocketType = SocketType.ssl,
- SocketType outgoingSocketType = SocketType.ssl,
- bool supportsPlusAliases = false,
- List<
MailAddress> aliases = const [],
Creates a mail account from manual settings with a simple user-name/password authentication.
You need to specify the account name, the associated email,
the incomingHost, outgoingHost and password.
When the userName is different from the email,
it must also be specified.
You should specify the outgoingClientDomain for sending messages,
this defaults to enough.de.
The incomingType defaults to ServerType.imap, the incomingPort
to 993 and the incomingSocketType to SocketType.ssl.
The outgoingType defaults to ServerType.smtp, the outgoingPort
to 465 and the outgoingSocketType to SocketType.ssl.
Implementation
factory MailAccount.fromManualSettings({
required String name,
required String email,
required String incomingHost,
required String outgoingHost,
required String password,
String userName = '',
ServerType incomingType = ServerType.imap,
ServerType outgoingType = ServerType.smtp,
String? loginName,
String outgoingClientDomain = 'enough.de',
int incomingPort = 993,
int outgoingPort = 465,
SocketType incomingSocketType = SocketType.ssl,
SocketType outgoingSocketType = SocketType.ssl,
bool supportsPlusAliases = false,
List<MailAddress> aliases = const [],
}) =>
MailAccount.fromManualSettingsWithAuth(
name: name,
email: email,
userName: userName,
incomingHost: incomingHost,
outgoingHost: outgoingHost,
auth: PlainAuthentication(loginName ?? email, password),
incomingType: incomingType,
outgoingType: outgoingType,
outgoingClientDomain: outgoingClientDomain,
incomingPort: incomingPort,
outgoingPort: outgoingPort,
incomingSocketType: incomingSocketType,
outgoingSocketType: outgoingSocketType,
supportsPlusAliases: supportsPlusAliases,
aliases: aliases,
);