Kapalı

PHP Email Bounce Management Class and Example

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','[url removed, login to view]',$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 [url removed, login to view] 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.

Beceriler: AJAX, MySQL, PHP

Daha fazlasını görün: php bounces, php bounce class, bounce php class, php bounce management, php email bounce management, bounce management php, bounce email php class, bounces php, email bounce management php, php email bounce class, class hard bounce php, bounce management php class, bounce class php, bounce class email php, php bounce email class, email bounce management, bounce email class, php class bounce, php bounce class free, php bounce email, when is escrow paid out, when is escrow com start, source code program php, simple free php code, programmers php

İşveren Hakkında:
( 0 değerlendirme ) Arlington, United States

Proje NO: #693963

2 freelancer bu iş için ortalamada 210$ teklif veriyor

srinichal

I can deliver the code as I have dealt with POP3 clients for gmail,yahoo also

in 4 gün içinde220$ USD
(84 Değerlendirme)
6.9
mechanic2000

expressing interest ..

in 5 gün içinde200$ USD
(0 Değerlendirme)
0.0