php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51017 mail() is sending emails it shouldn't be
Submitted: 2010-02-11 14:40 UTC Modified: 2010-02-12 16:29 UTC
From: son9ne at gmail dot com Assigned:
Status: Not a bug Package: Mail related
PHP Version: 5.2.12 OS: Mac OSx
Private report: No CVE-ID: None
 [2010-02-11 14:40 UTC] son9ne at gmail dot com
Description:
------------
I have been working on a simple cron system. I have had no issue with it up until yesterday. I am not 100% sure how to duplicate this since I am stuck with this issue and cannot get stop it...

The problem that is happening is when calling mail() for only 1 test email, it sends over 200 messages with a totally different subject and message... It's like the emails are cached or something, not my area of expertise.

I am reporting this to make note of the issue, I doubt I am the only one having it.

This information may be helpful also. At some point, while still developing the script, the script did send run though a loop where it would have sent out over 1,000 emails (all addressed to me). Could these emails somehow be stuck in the system? I am not that savvy when it comes to these things... These extra emails are being sent when I am using any script now that uses the mail function. Thus mail is absolutely useless at this point for me and has me at a stand still for this script. I have even tried creating a new file and only having the mail function with a test message to me and it does the exact same thing. Every script on my system does this now. 

Reproduce code:
---------------
Like I have said, I am not aware of how to duplicate what triggered this to happen; but for me, just calling 

mail('my@email.com' 'Test subject', 'test message', 'From: my@email.com', '-f my@email.com');

Will send out 100-200 emails to me with a message of an email I was testing yesterday.


Expected result:
----------------
I'd expect to see a single email with the proper subject and content.

Actual result:
--------------
I do receive the test email but I am also receiving between 100-200 emails of a previous email. Makes me wonder who is getting who's emails...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-12 16:29 UTC] jani@php.net
Please consult your local sendmail (or whatever mailer you might be using) consultant to fix your setup. There's nothing wrong with mail(), just in your configuration. (no, I don't know what is wrong, mail() works fine in properly configured environment)
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Oct 06 15:05:53 2022 UTC