$PID = rand_string(20); //unique by chance :) $CONFIG['SMTP_PROCESS_BATCH'] = is_int($CONFIG['SMTP_PROCESS_BATCH']) === true && $CONFIG['SMTP_PROCESS_BATCH'] > 0 ? $CONFIG['SMTP_PROCESS_BATCH'] : 1; $CONFIG['SMTP_CLEAR_SUCCESS'] = is_bool($CONFIG['SMTP_CLEAR_SUCCESS']) === true && $CONFIG['SMTP_CLEAR_SUCCESS'] === true ? true : false; //Check when the queue was last processed and die() if too soon process_lockfile($CONFIG['SMTP_QUEUE_DIFF'], $PID); /* setup e-mail object */ require_once 'SendEmail.php'; $e = new SendEmail(); $e->set_hostname($CONFIG['WEBSERVER_RDNS']); // rDNS name of your server - php_uname('n') is only guess $e->set_server($CONFIG['SMTP_SERVER'], $CONFIG['SMTP_PORT']); $e->set_auth($CONFIG['SMTP_USER'], $CONFIG['SMTP_PASSWORD']); $e->set_sender($CONFIG['SMTP_FROM'], $CONFIG['SMTP_FROM_EMAIL']); //this is the FROM: info of the email $e->set_crypto($CONFIG['SMTP_CRYPTO']); // starttls , tls , ssl or none if ($CONFIG['SMTP_PASSWORD'] == 12345) { echo "1,2,3,4,5? .... That's amazing! I've got the same combination on my luggage!\n"; } /* connect to database */ $conn = @mysqli_connect($CONFIG['DB_SERVER'], $CONFIG['DB_USER'], $CONFIG['DB_PASSWORD'], $CONFIG['DB_NAME']); if (!$conn) { $msg = "Unable to connect with MySQL server\n" . "Error reported by mySQL: " . mysqli_connect_error(); throw new Exception($msg); } if (!mysqli_set_charset($conn, 'utf8')) { $msg = "Failed to set charset to utf8!\n" . "Error reported by mySQL: " . mysqli_error($conn); throw new Exception($msg); } /*