ImapMailMerge/ImapMailMerge.php

47 lines
1.5 KiB
PHP
Executable File

#!/usr/bin/php
<?php
/**
* Program Name: DubTempo's Mail Merge Service for Netpay Payroll
* Program URI: https://gitea.dubtempo.com/NPPR/ImapMailMerge
* Author: Dubtempo
* Author URI: http://dubtempo.com
* License: Copyright Dubtempo
* Version: 1.0.1
* @SuppressWarnings(PHPMD.ElseExpression)
* Description: Netpay employees were blacklisted from all ATT&T services for
* the practice of sending reminders to clients. They would send
* to & from themselves, with BCCs for each client to be reminded.
*
* This code helps replace that practice with direct messages.
* To use, approved users send their notifications to
* <mailmerge@netpaypayroll.com>, with the destination clients
* specified via Return-To Headers.
*
* Note!!!:
* Each user must be whitelisted in IMAPMailMerge->safelist.
*/
//error_reporting(-1);
//ini_set('display_errors', 'On');
//set_error_handler("var_dump");
//ini_set("mail.log", "/home4/dubtempo/custom_scripts/imapmailmerge/mail.log");
//ini_set("mail.add_x_header", TRUE);
$GoMailMerge = new MailMerge();
class MailMerge
{
public function __construct()
{
require_once __DIR__ . '/autoload.php';
$imap_connection = new \DT\ImapMailMerge\Imap\Connection;
$process_safelist = new DT\ImapMailMerge\Main\ProcessSafelist;
$process_inbox = new DT\ImapMailMerge\Main\ProcessInbox;
$process_messages = new DT\ImapMailMerge\Main\ProcessMessages;
}
}