This tool allows you to receive a report of each user's posts by email.
use paolodinotte\Tool\Tool;
// Define SMTP credentials and configuration
$emailConfiguration = array(
"host" => "SMTP host",
"username" => "your SMTP username",
"password" => "your SMTP password",
"port" => smpt service port
);
// Define sender mail and name
$sender = "[email protected]";
$senderName = "Sender Name";
// Define subject of the email
$subject = "Email subject";
// Define the limit number of posts for each user
$postsUpperLimit = 3;
// Define the recients mails which have to receive the resume
$recipients = array(
"[email protected]",
"[email protected]",
);
// Create the Tool instance
// IMPORTANT if the SMTP connection fails an exception is thrown
$phpTool = new Tool($emailConfiguration);
// Send the resume mail according to the previous params
$phpTool->sendUsersPostsEmail(
$sender,
$senderName,
$recipients,
$subject,
$postsUpperLimit
);