Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POP3 Configration can not be saved #6297

Merged
merged 2 commits into from Oct 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion include/class.mail.php
Expand Up @@ -235,7 +235,7 @@ private function basicAuth($username, $password) {
}

abstract public function __construct($accountSetting);
abstract private function oauth2Auth(AccessToken $token);
abstract protected function oauth2Auth(AccessToken $token);
}

class ImapMailboxProtocol extends ImapProtocol {
Expand Down Expand Up @@ -326,6 +326,14 @@ public function readLine() {
return trim($result);
}

public function login($user, $password, $tryApop = true) {
try {
parent::login($user, $password, $tryApop);
return true;
} catch (\Throwable $e) {
throw new Exception(__('login failed').': '.$e->getMessage());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update this later to just $e->getMessage()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't update this. $e-getMessage() returns only "last request failed".
A normal User don't know, what this meens. So he know, It happens on login...

}
}
}

// MailBoxStorageTrait
Expand Down