php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31676 Occured SMTP error if we sent 10 mails with mail() function at the same tim
Submitted: 2005-01-24 09:31 UTC Modified: 2005-01-24 10:06 UTC
From: ysuzuki at zend dot co dot jp Assigned:
Status: Not a bug Package: Mail related
PHP Version: 4.3.10 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ysuzuki at zend dot co dot jp
New email:
PHP Version: OS:

 

 [2005-01-24 09:31 UTC] ysuzuki at zend dot co dot jp
Description:
------------
When we tried to sent 10 mails at the same time by using mail function(), Some mails were occurred SMTP 503 error such as 
Actual result portion.Please see the following "Actual result".


How to reproduce:
1)Launched your Web browser
2)Access send_mail.php script
   Repeat access send_mail.php by clicking reload button 
   on Web browser



Reproduce code:
---------------
<?php
define('MAIL_ADDER', 'ysuzuki@zend.co.jp');
define('MAIL_SEND_COUNT', 1);

header('Content-type: text/plain');

//Send Mail
for ($i = 0; $i <= MAIL_SEND_COUNT; $i++) {
    if (mail(MAIL_ADDER, "TEST MAIL $i", 'This is test Mail')) {
        echo "OK\n";
    } else {
        echo "BAT\n";
    }
}

?>

Expected result:
----------------
All send requested E-mail were successful by using mail() function even it was many requested from Web browser.

Actual result:
--------------
Error Message:
[18-Jan-2005 09:18:23] PHP Warning:  mail() [<a href='http://example.com/function.mail'>function.mail</a>]: Failed to connect to mailserver at "smtp.example.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in \\exampleserver\send_mail.php line xxx

[18-Jan-2005 09:18:23] PHP Warning:  mail() [<a href='http://example.com/function.mail'>function.mail</a>]: SMTP server response: 503 Sender already specified in \\exampleserver\send_mail.php on line xxx

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-24 09:52 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.
 [2005-01-24 10:06 UTC] ysuzuki at zend dot co dot jp
We also tried the following test by using same script file such as send_mail.php.

1) Launched 10 DOS prompt on Windows 2000 Server
2) Launched send_mail.php on each DOS prompt
    such as "php.exe send_mail.php"

This result was OK. Because All sent E-mails were successful.Therefore, This problem looks like related with PHP + Apache 2, I think.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Nov 28 08:05:53 2022 UTC