Project ID:
693963
Project Type:
Fixed
Budget:
$30-$250 USD
Project Description:
I need a program that is robust, FAST, and most importantly of all, FAST!
In the end, I want a Cron Job that will run every X minutes, open a bounce email account via POP3, download X messages (Removing as it goes so no overlap occurs), parse the message content (Keeping in mind low memory usage), Determine the bounce type, original address, if it is a Hard or Soft bounce, and the original message header details as well as a snippet of the content from the original message.
Example would be something like
<?php
$numtograb = 10; //NUMBER OF BOUNCE EMAILS TO GRAB
$memLimit = 32000000; //MEMORY LIMIT
$messageLimit = 2000; //LIMIT NUMBER OF CHARACTERS OF BODY CONTENT RETURNED BY CLASS FOR EACH EMAIL
$messageHeadersLimit = 2000; //LIMIT NUM OF CHARS FOR RETURNED HEADER
$bounceClass = new bounceClass('test@email_com','username','pass','bouncehost.com',$numtograb,$memLimit,$messageLimit,$messageHeadersLimit);
$bounces = $bounceClass->getBounces();
for($i = 0;$i < count($bounces);$i++) {
$bounceType = $bounces[$i]['type']; //HARD OR SOFT BOUNCE
$bounceTypeExtended = $bounces[$i]['typeExtended']; //RAW BOUNCE CODE
$originalMessage = $bounce[$i]['originalMessage']; //ORIGINAL EMAIL CONTENT SNIPPET
$bouncedEmailAddress = $bounce[$i]['bouncedEmailAddress']; //EMAIL ADDRESS THAT BOUNCED
$bounceHeaders = $bounce[$i]['bounceHeaders'];
if($bounceType == 'hard') {
//MY CODE TO PROCESS UNSUBSCRIPTIONS
}
}
Example Class start
class bounceClass {
var $email = '';
var $user = '';
var $pass = '';
var $host = '';
var $numToGrab = '';
var $memLimit = '';
var $messageLimit = '';
var $headersLimit = '';
function bounceClass($email,$user,$pass,$host,$numToGrab=10,$memLimit=32000000,$messageLimit=2000,$headersLimit=2000){
//INIT FUNCTION, GRAB MESSAGES VIA POP, REPORT ERROR TO $bounceClass->errors[] array
//RETURN ONLY TRUE / FALSE FOR SUCCESS OR FALSE ON GRABBING MESSAGES IN INIT
grabMessages();
$this->bounces = processMessages();
}
?>
I need something that can handle thousands of messages per run, and multiple runs simultaneously while preventing overlap. (Each process needs to grab messages, then close the connection for the rest of the processing. If it hits the memory limit, drop out of POP3, process the messages currently held, and close all unused elements in the array holding the messages to free up memory, then continue. IE: Purge all but the final array of bounceType, bounceTypeExtended, originalMessage, bouncedEmailAddress
I would like the class to be as simple as possible in regards to use, as I would like to keep most of it handled inside of the class itself.
I ONLY WANT 1 bounceClass.php FILE in the end (Also the example, but I mean for use).
It's important that I do not get multiple sub classes, global functions, I want only 1 bounce class that handles the pop connectivity, login process, emails, everything!
Required functions
$bounceClass->getBounceTypeFromEmailContent($messageContent);
$bounceClass->getExtendedBounceTypeFromEmailContent($messageContent);
When the job is complete, all files and source will be owned by me and removed from programmers system. All source code will be copyrighted to me.
First half of payment will be placed in escrow upon taking and accepting the job, to be released after first sample is shown. Second half of payment will be sent upon successfull test of the final software.
NO FREE CLASSES, GNU, GPL, FREEBSD, ANY FREE OR PAID OR COPYRIGHTED SOFTWARE FROM ANYTHING.
ONLY CUSTOM CODED, INCLUDING POP3 INTERFACE, MUST USE PHP FUNCTIONS 5+ ONLY!
Thanks for looking.
Skills required:
AJAX,
MySQL,
PHP