mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-11-02 11:47:56 +00:00
Fixing revoked SQL statement
This commit is contained in:
@@ -20,11 +20,13 @@ namespace OpenWifi {
|
|||||||
Obj->has("text") &&
|
Obj->has("text") &&
|
||||||
Obj->has("recipients")) {
|
Obj->has("recipients")) {
|
||||||
auto Recipients = Obj->getArray("recipients");
|
auto Recipients = Obj->getArray("recipients");
|
||||||
|
auto Recipient = Recipients->get(0).toString();
|
||||||
MessageAttributes Attrs;
|
MessageAttributes Attrs;
|
||||||
Attrs[RECIPIENT_EMAIL] = Recipients->get(0).toString();
|
std::cout << "Mailing to:" << Recipient << std::endl;
|
||||||
|
Attrs[RECIPIENT_EMAIL] = Recipient;
|
||||||
Attrs[SUBJECT] = Obj->get("subject").toString();
|
Attrs[SUBJECT] = Obj->get("subject").toString();
|
||||||
Attrs[TEXT] = Obj->get("text").toString();
|
Attrs[TEXT] = Obj->get("text").toString();
|
||||||
if(SMTPMailerService()->SendMessage(Recipients->get(0).toString(), "password_reset.txt", Attrs)) {
|
if(SMTPMailerService()->SendMessage(Recipient, "password_reset.txt", Attrs)) {
|
||||||
return OK();
|
return OK();
|
||||||
}
|
}
|
||||||
return ReturnStatus(Poco::Net::HTTPResponse::HTTP_SERVICE_UNAVAILABLE);
|
return ReturnStatus(Poco::Net::HTTPResponse::HTTP_SERVICE_UNAVAILABLE);
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ namespace OpenWifi {
|
|||||||
|
|
||||||
Poco::Net::MailMessage Message;
|
Poco::Net::MailMessage Message;
|
||||||
std::string Recipient = Msg.Attrs.find(RECIPIENT_EMAIL)->second;
|
std::string Recipient = Msg.Attrs.find(RECIPIENT_EMAIL)->second;
|
||||||
|
std::cout << "Mailer: " << Recipient << std::endl;
|
||||||
Message.setSender(Sender_);
|
Message.setSender(Sender_);
|
||||||
Message.addRecipient(Poco::Net::MailRecipient(Poco::Net::MailRecipient::PRIMARY_RECIPIENT, Recipient));
|
Message.addRecipient(Poco::Net::MailRecipient(Poco::Net::MailRecipient::PRIMARY_RECIPIENT, Recipient));
|
||||||
Message.setSubject(Msg.Attrs.find(SUBJECT)->second);
|
Message.setSubject(Msg.Attrs.find(SUBJECT)->second);
|
||||||
|
|||||||
Reference in New Issue
Block a user