You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to log in my company mail address using IMAP protocol. I managed to get the server config using the Discover.discover() method, but when I try to use MailClient.connect() method, it throws me an error saying :
Exception has occurred.
MailException (MailException: null: null
)
My code :
final config = await Discover.discover("[email protected]");
final account;
if (config == null) { // Never reached, but set in case of failure
account = MailAccount.fromManualSettings(
"My Name",
"[email protected]",
"outlook.office365.com",
"smtp.office365.com",
"P@ssword",
outgoingClientDomain: "company.fr",
outgoingPort: 587,
outgoingSocketType: SocketType.starttls);
} else {
account = MailAccount.fromDiscoveredSettings(
"My Name", "[email protected]", r"P@ssword", config,
outgoingClientDomain: "company.fr");
}
final mailClient = MailClient(account, isLogEnabled: true);
try {
await mailClient.connect();
print("mail client connected ! :D");
final mimeMessage = buildMessage();
await mailClient.sendMessage(mimeMessage);
} on Exception catch (e) {
Navigator.of(context).pop();
rethrow;
}
My logs :
flutter: failed to find settings for company.fr: imap: failure pop: failure smtp: failure
flutter: A: connecting to server outlook.office365.com:993 - secure: true, timeout: 0:00:10.000000
flutter: S: * OK The Microsoft Exchange IMAP4 service is ready. [UABSADMAUAAxADgAOQBDAEEAMAAwADUAMAAuAEUAVQBSAFAAMQA4ADkALgBQAFIATwBEAC4ATwBVAFQATABPAE8ASwAuAEMATwBNAA==]
flutter: C: a0 LOGIN "[email protected]" "(password scrambled)"
flutter: S: a0 NO LOGIN failed.
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to log in my company mail address using IMAP protocol. I managed to get the server config using the Discover.discover() method, but when I try to use MailClient.connect() method, it throws me an error saying :
My code :
My logs :
The text was updated successfully, but these errors were encountered: