RE: [PHP] can u find error in php file?
| From: | Rick Emery | Date: | Tue, 08 Jan 2002 15:16:11 +0000 |
| Subject: | RE: [PHP] can u find error in php file? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-79788@lists.php.net to get a copy of this message | ||
Given the simplicity of the mail() function, why go to all this trouble? I
must be missing something here. Does your PHP host lack SMTP, so you must
use another server's SMTP?
-----Original Message-----
From: Balaji Ankem [mailto:balaji.ankem@wipro.com]
Sent: Tuesday, January 08, 2002 3:25 AM
To: php-general@lists.php.net
Subject: [PHP] can u find error in php file?
<?php
include_once('Mail/smtp.php');
include_once('Net/SMTP.php');
# Replace 127.0.0.1 with another SMTP host if needed
$smtp_session = new Mail_smtp(array('10.145.0.18', 25, TRUE, '', ''));
$headers['Subject'] = 'Sample subject';
$headers['Reply-To'] = 'balaji.ankem@wipro.com'
<mailto:'balaji.ankem@wipro.com'> ;
$headers['From'] = 'balaji.ankem@wipro.com'
<mailto:'balaji.ankem@wipro.com'> ;
$headers['User']='bankem';
$headers['Password']='narayana';
$recipients = array( 'balaji.ankem@wipro.com'
<mailto:'balaji.ankem@wipro.com'>
);
$body = <<<EOF
This is a sample body.
EOF;
$return = $smtp_session->send($recipients, $headers, $body);
if ($return)
echo "Mail was successfully sent to balaji.ankem@wipro.com"
<mailto:balaji.ankem@wipro.com> ;
else
echo "FAIL";
?>
for above program I am getting Mail was successfully sent to
balaji.ankem@wipro.com <mailto:balaji.ankem@wipro.com> .
But actually no mail was received by me.
-Balaji