Page 1 of 1

no error on faulty target-address?

Posted: Sat May 12, 2007 10:43 pm
by japanitrat
hi,


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 ...
building/sending upon $_REQUEST just used for testing.
using Swift-3.2.1-php5

Posted: Sun May 13, 2007 5:22 am
by Chris Corbyn
My email reply wrote:Hi,

Swift will only give an error if your SMTP server does. If your SMTP server accepts the mail but subsequently bounces it there's not a lot Swift can do. You can check MX addresses at runtime but the overhead of doing this is huge. If your SMTP server had given anything but a 250 response this would not have happened ;)

Most SMTP servers have an option in their config files to "verify domain".

Best Regards,

Chris

Posted: Sun May 13, 2007 4:47 pm
by japanitrat
hm okay, than i might ask a non-swiftmailer question.
does somebody know a good facility to parse those return- & bounce-to boxes, where failure emils go to?