i heard only the best about swiftmailer, so i decided to set one up on my homeserver.
emails goin out, all fine.
the problem is: "notexistinguser@notexistingdomain.tld" will not detected as faulty target address at runtime, but returned to the specified return-path as "failure notice".
is there a way to detect this (with swift) without those bounce-to-boxes?
here my code:
Code: Select all
$swift =& new Swift($smtp);
$swift->log->enable();
$message = new Swift_Message($_REQUEST["subject"], $_REQUEST["message"]);
$message->setReturnPath($_REQUEST["failbox"]);
if(!$swift->send($message, $_REQUEST["email"], $_REQUEST["origin"])) echo "error occured"; // never called
$swift->disconnect();
print_r($swift->log->getFailedRecipients()); // ever returns an empty array ...using Swift-3.2.1-php5