php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1321 A failed mail() makes the PHP go in an endless loop sending mails
Submitted: 1999-04-16 05:31 UTC Modified: 1999-04-16 10:07 UTC
From: christian at factory dot dk Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.6 OS: WinNT 4.0
Private report: No CVE-ID: None
 [1999-04-16 05:31 UTC] christian at factory dot dk
Here is a example script for the bug:

<html><head><title>Untitled</title></head>

<body>
<?
       mail("christian@factory", "This is the subject", "This is the body\n", "From: christian@factory.dk");
?>
       It's done it again	

</body>
</html>

I'm trying to send an email to a non existing domain "factory" instead of "factory.dk". The PHP script apparently goes crazy and try sending the mail again every minute for a couple of days... Our mailsystem sends the sender
and error message every times. With a thousand sendings a day the system returns thousan error messages a day.  Big time SPAM!

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-04-16 10:07 UTC] rasmus
This is not a PHP issue.  PHP just hands the mail off to either sendmail or in your case it probably sends it directly to an smtp server.  It just does this once.  The delivery agent you are using is doing the retries.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 22:01:34 2025 UTC