PHP-Bounce-Handler icon indicating copy to clipboard operation
PHP-Bounce-Handler copied to clipboard

Feature request : add type of bounce : soft or hard bounce

Open kcassam opened this issue 11 years ago • 1 comments

add a getType() function.

code/type table can be found her for example : http://www.activecampaign.com/help/bounces-soft-bounce-vs-hard-bounce/

kcassam avatar Oct 16 '13 10:10 kcassam

I'm just looking into this and according to the "official" RFC concerning status codes - http://tools.ietf.org/html/rfc3463 ("official" - meaning software should follow the specification, but they don't always), 5.xxx.xxx should be treated as permanent failures ("hard" bounces) whereas 4.xxx.xxx should be treated as persistent transient failures ("soft" bounces - as a retry can be attempted). This is the current settings of PHP-Bounce-Handler.

I'm not sure how ActiveCampaign compiled their status code list, but it would need that sort of functionality, use something like:

$facts=$bouncehandler->get_the_facts($email);
$code=$bouncehandler->format_status_code($facts[0]['status']);
if (true===in_array($code['code'],array('5.2.0','5.2.1','5.2.2'...))) {
 return "soft";
} else {
 return "hard";
}

rbairwell avatar Dec 29 '14 16:12 rbairwell