mirror of
				https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
				synced 2025-10-29 18:02:29 +00:00 
			
		
		
		
	Fixing email and SMS notifications.
This commit is contained in:
		| @@ -21,16 +21,9 @@ namespace OpenWifi { | ||||
|             Obj->has("recipients") && | ||||
|             Obj->isArray("recipients")) { | ||||
|  | ||||
|             std::cout << "subject: " << Obj->get("subject").toString() << std::endl; | ||||
|             std::cout << "from: " << Obj->get("from").toString() << std::endl; | ||||
|             std::cout << "text: " << Obj->get("text").toString() << std::endl; | ||||
|  | ||||
|             Poco::JSON::Array::Ptr Recipients = Obj->getArray("recipients"); | ||||
|             auto Recipient = Recipients->get(0).toString(); | ||||
|             std::cout << "Size: " << Recipients->size() << std::endl; | ||||
|             std::cout << "R: " << Recipient << std::endl; | ||||
|             MessageAttributes Attrs; | ||||
|             std::cout << "Mailing to:" << Recipient << std::endl; | ||||
|             Attrs[RECIPIENT_EMAIL] = Recipient; | ||||
|             Attrs[SUBJECT] = Obj->get("subject").toString(); | ||||
|             Attrs[TEXT] = Obj->get("text").toString(); | ||||
|   | ||||
| @@ -115,7 +115,6 @@ namespace OpenWifi { | ||||
|  | ||||
|             Poco::Net::MailMessage  Message; | ||||
|             std::string             Recipient = Msg.Attrs.find(RECIPIENT_EMAIL)->second; | ||||
|             std::cout << "Mailer: " << Recipient << std::endl; | ||||
|             Message.setSender(Sender_); | ||||
|             Message.addRecipient(Poco::Net::MailRecipient(Poco::Net::MailRecipient::PRIMARY_RECIPIENT, Recipient)); | ||||
|             Message.setSubject(Msg.Attrs.find(SUBJECT)->second); | ||||
|   | ||||
| @@ -354,7 +354,7 @@ case "$1" in | ||||
|     "setavatar") login; setavatar "$2"; logout;; | ||||
|     "getavatar") login; getavatar "$2"; logout;; | ||||
|     "deleteavatar") login; deleteavatar "$2"; logout;; | ||||
|     "sendemail") login; sendemail ; logout;; | ||||
|     "sendemail") login; sendemail "$2" "$3"; logout;; | ||||
|     "sendsms") login; sendsms "$2" "$3" ; logout;; | ||||
|     "testlogout") login; testlogout ;; | ||||
|     "setloglevel") login; setloglevel "$2" "$3"  ; logout ;; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 stephb9959
					stephb9959