<?php require_once 'config/Config.php'; require_once 'lib/sendMail.php'; use IP\sendMail; $mail = new sendMail(); $toList = [['email' => '*****@*****.**', 'name' => 'satheesan'], ['email' => '*****@*****.**', 'name' => 'satheesan']]; echo json_encode($toList); $mail->sendMail($toList, 'Testing', 'This is a testmail');
} $user = $request->getJSON(); if (!$request->validate('Admin')) { $user->status = 'Pending'; } else { $user->status = 'Approved'; } if (!$user->username || !$user->email || !$user->name || !$user->institute) { $message = "FAILED: Missing required fields!!"; } else { $message = $db->createUser($user); } $output->message = $message; if ($message === 'SUCCESS') { if ($user->status == 'Pending') { $mail = new sendMail(); $toList = $db->getUser(null, null, 'Admin'); //echo json_encode($toList); $subject = 'Pending Approval User: '******'/password/i', $key)) { continue; } $body .= "<tr>"; $body .= "<td>{$key}</td><td>{$row}</td>"; $body .= "</tr>"; } $body .= "</table>"; $approveURL = $_SERVER["HTTP_REFERER"] . "#/userList"; $link = '<a href="' . $approveURL . '" style="font-size:16px; font-weight: bold; font-family: Helvetica, Arial, sans-serif; text-decoration: none; line-height:40px; width:100%; display:inline-block"><span style="background-color: blue;color: white;margin: 2px;padding: 5px;border-radius: 15px;">Approve</span></a>';