php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24761 Errors appear when i try to send mail
Submitted: 2003-07-22 19:52 UTC Modified: 2003-07-23 08:35 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: prashant at travelingnepal dot com Assigned:
Status: Not a bug Package: Mail related
PHP Version: 4.3.2 OS: Windows 2002 Server
Private report: No CVE-ID: None
 [2003-07-22 19:52 UTC] prashant at travelingnepal dot com
Description:
------------
Dear Sir,
I just have installed Php 4.3.2 and when i try to use the mail function it says the following error:

Warning: mail(): SMTP server response: 501 Syntax error in parameters in [File Directory] on line [Line Number]

Reproduce code:
---------------
<?php
$recipient="me@mymail.com";
$subject="Test Mail" ;

$message.="Test Mail\n";

$headers .= "From: <Test@test.com>\n";
$headers .= "X-Sender: <test@test.com>\n"; 
$headers .= "Return-Path: <$email>\n";
$headers .= "bcc: me@mymail1.com\n";

$success=mail($recipient,$subject,$message,$headers);
unset($subject);
unset($message);
unset($header);

if ($success) { echo"Your Message has been send";
}
?>

Expected result:
----------------
To send me a mail at me@mymail.com from test@test.com and also bcc to me@mymail1.com and says "Your Message has been send".

Actual result:
--------------
Warning: mail(): SMTP server response: 501 Syntax error in parameters in [File Directory] on line [Line Number]

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-22 19:53 UTC] iliaa@php.net
What is the name & version of the SMTP server you are using?

Does the problem still occur if you remove the space between the "bcc:" and the e-mail address?
 [2003-07-23 00:12 UTC] prashant at travelingnepal dot com
Dear Sir,
Thank you very much for your kind cooperation. Now php mail seems to be working fine by removing the 'space' after 'bcc' or in 'recipient' address. But my question is, can i able to send email without removing space after bcc because i have used this mailform script for 100's of form. So can you please suggest me some idea... Any help would really appreciated...

Thank you once again for your kind cooperation,
Prashant
 [2003-07-23 08:35 UTC] iliaa@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

This bug is a duplicate for bug #23798 for which a fix will be applied shortly. Keep an eye out on the status of the above mentioned bug report.
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Feb 08 11:03:42 2023 UTC