-
Notifications
You must be signed in to change notification settings - Fork 124
Open
Description
Some email providers like brevo have really long passwords (90 characters), and auth_login breaks because it only get's the first 78 characters from base64
void smtp::auth_login(const string& username, const string& password)
{
dlg_->send("AUTH LOGIN");
string line = dlg_->receive();
tuple<int, bool, string> tokens = parse_line(line);
if (std::get<1>(tokens) && !positive_intermediate(std::get<0>(tokens)))
throw smtp_error("Authentication rejection.", std::get<2>(tokens));
// TODO: Use static encode from the Base64 codec.
base64 b64(static_cast<string::size_type>(codec::line_len_policy_t::RECOMMENDED), static_cast<string::size_type>(codec::line_len_policy_t::RECOMMENDED));
auto user_v = b64.encode(username);
string cmd = user_v.empty() ? "" : user_v[0];```
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels