its a long message. if anybody have
enough time please take a look
at this . i have incorporated
the code and all the error message here.
i am trying to send mail using
php script which is running
in my local computer(windows xp sp2).though
php mail function evalutaes true
for sending mail but the
smtp server cannot deliver the
mail to the destination.
here is the code for sending the mail
$to = "
[email protected]";
$subject = "RSS- NEW registration";
$body ="Mail Demo";
//ini_set('sendmail_from', "
[email protected]");
$header = "From:zico <
[email protected]>\r\n";
$header .= "Reply-To:
[email protected]\r\n";
$header .= "X-Mailer: PHP/" . phpversion() . "\r\n";
$header .= "X-Priority: 1";
$sent =mail($to, $subject, $body,$header);
echo $sent."\n";
if ($sent) {
echo $body."\n";
echo("<p>Message successfully sent!</p>");
} else {
// echo("<p>Message delivery failed...</p>");
}
it shows following error
in bad file
From: postmaster@misu-7be13ecfff
To: you@yourdomain
Date: Thu, 18 Oct 2007 00:55:36 +0600
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="9B095B5ADSN=_01C810EED70A423600000001mis u?7be13ecfff"
Message-ID: <wSA1XvpFV00000001@misu-7be13ecfff>
Subject: Delivery Status Notification (Failure)
This is a MIME-formatted message.
Portions of this message may be unreadable without a MIME-capable mail program.
--9B095B5ADSN=_01C810EED70A423600000001misu?7be13ecf ff
Content-Type: text/plain; charset=unicode-1-1-utf-7
This is an automatically generated Delivery Status Notification.
Delivery to the following recipients failed.
[email protected]
--9B095B5ADSN=_01C810EED70A423600000001misu?7be13ecf ff
Content-Type: message/delivery-status
Reporting-MTA: dns;misu-7be13ecfff
Received-From-MTA: dns;misu-7be13ecfff
Arrival-Date: Thu, 18 Oct 2007 00:55:31 +0600
Final-Recipient: rfc822;
[email protected]
Action: failed
Status: 5.0.0
Diagnostic-Code: smtp;501 Syntax error in parameters or arguments
--9B095B5ADSN=_01C810EED70A423600000001misu?7be13ecf ff
Content-Type: message/rfc822
Received: from misu-7be13ecfff ([127.0.0.1]) by misu-7be13ecfff with Microsoft SMTPSVC(6.0.2600.2180);
Thu, 18 Oct 2007 00:55:31 +0600
Date: Wed, 17 Oct 2007 18:55:31 +0000
Subject: RSS- NEW registration
To:
[email protected]
From:zico <
[email protected]>
Reply-To:
[email protected]
X-Mailer: PHP/5.2.1
X-Priority: 1
Return-Path: you@yourdomain
Message-ID: <MISU-7BE13ECFFF0usd00000001@misu-7be13ecfff>
X-OriginalArrivalTime: 17 Oct 2007 18:55:31.0484 (UTC) FILETIME=[4A992DC0:01C810EF]
Mail demo
--9B095B5ADSN=_01C810EED70A423600000001misu?7be13ecf ff--
----------------------------------------
and the bdr file show following message
Unable to deliver this message because the follow error was encountered: "This message is a delivery status notification that cannot be delivered.".
The specific error code was 0xC00402C7.
The message sender was <>.
The message was intended for the following recipients.
you@yourdomain
------------------------------
i am using wamp server for php script
and configuration for php.ini file are
as follows
; For Win32 only.
SMTP = localhost
smtp_port=25
; For Win32 only.
sendmail_from =
[email protected]
----------------------------------
thanks
rashed