<?php

require_once '_init.php';
$userId = 17;
$emailId = 15;
$mail = new ManageMailQueue($container_options, $mail_options);
$mail->extractDataFromUserId($userId);
$mail->addByEmailId($emailId);
$idLasEmailInQueue = $mail->getNewMailQueueId();
echo 'the last item added in the queue, as ID: ';
pr($idLasEmailInQueue);
Пример #2
0
<?php

require_once '_init.php';
$mail = new ManageMailQueue($container_options, $mail_options);
$mail->from = isset($_REQUEST['from']) ? $_REQUEST['from'] : '{admin_from}';
$mail->fromName = isset($_REQUEST['fromName']) ? $_REQUEST['fromName'] : '{admin_from_name}';
$mail->recipient = isset($_REQUEST['recipient']) ? $_REQUEST['recipient'] : '{admin_from}';
$mail->recipientName = isset($_REQUEST['recipientName']) ? $_REQUEST['recipientName'] : '{admin_from_name}';
$mail->messageHtml = isset($_REQUEST['messageHtml']) ? $_REQUEST['messageHtml'] : '{admin_html_message}';
$mail->messageTxt = isset($_REQUEST['messageTxt']) ? $_REQUEST['messageTxt'] : '{admin_txt_message}';
$mail->subject = isset($_REQUEST['subject']) ? $_REQUEST['subject'] : '{admin_subject}';
$mail->sendHtml = true;
$mail->sendTxt = true;
$mail->addByCustomParams();
header("Location: ../index.php");
<?php

require_once '_init.php';
$userId = cleanRequest('userId');
$emailId = cleanRequest('emailId');
if (!$userId && !$emailId) {
    die("REQUEST = NULL");
} else {
    $mail = new ManageMailQueue($container_options, $mail_options);
    $mail->extractDataFromUserId($userId);
    $mail->addByEmailId($emailId);
    header("Location: ../index.php");
}
<?php

require_once '_init.php';
$mail = new ManageMailQueue($container_options, $mail_options);
$mail->from = '{admin_from}';
$mail->fromName = '{admin_from_name}';
$mail->recipient = '*****@*****.**';
$mail->recipientName = 'Santiago Battaglino';
$mail->messageHtml = "<p>test html body {admin_from_name} <br/><br/> {admin_signature}</p>";
$mail->messageTxt = "test txt body {admin_from} \n\n {admin_signature}";
$mail->subject = 'Testing sendCustomMessage';
$mail->sendHtml = true;
$mail->sendTxt = true;
$mail->addByCustomParams();
$idLasEmailInQueue = $mail->getNewMailQueueId();
echo 'the last item added in the queue, as ID: ';
pr($idLasEmailInQueue);