|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-07-22 19:53 UTC] iliaa@php.net
[2003-07-23 00:12 UTC] prashant at travelingnepal dot com
[2003-07-23 08:35 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 19:00:01 2025 UTC |
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]