Exemplo n.º 1
0
<?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');
Exemplo n.º 2
0
} 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>';
        $body .= $link;
        $mail->sendMail($toList, $subject, $body);
    }
    $user = $db->getUser($user->username);
    $output->user = $user;
}
header('HTTP/1.0 200 Success');
header('Content-type: application/json');
echo json_encode($output);