feat: integrate Resend for OTP email delivery and update configuration

This commit is contained in:
gabdevele
2026-06-18 02:36:53 +02:00 Unverified
parent 07a660dc72
commit edadc258db
12 changed files with 91 additions and 109 deletions
+2 -2
View File
@@ -328,12 +328,12 @@ Json::Value AuthService::requestOtp(const Json::Value &body)
email::EmailService mail;
if (!mail.sendOtp(user[0]["email"].as<std::string>(), code))
{
LOG_WARN << "Could not send OTP email through Mailpit";
LOG_WARN << "Could not queue OTP email through " << mail.deliveryName();
return failure("otp_email_failed");
}
auto response = success();
response["delivery"] = "mailpit";
response["delivery"] = mail.deliveryName();
response["expires_in_minutes"] = otpTtlMinutes();
return response;
}