Hi Jon,
   I am not running "sendmail" on my localhost.
I am sending stuff to my company mail server.

yaa I tried with SMTP also..But no use..

if u don't mind...please check the following code..

<?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'] = '[EMAIL PROTECTED]';
$headers['From'] = '[EMAIL PROTECTED]';
$headers['User']='bankem';
$headers['Password']='narayana';
$recipients = array('[EMAIL PROTECTED]');

$body = <<<EOF

   This is a sample body.

EOF;

$return = $smtp_session->send($recipients, $headers, $body);

if ($return)
   echo "Mail was successfully sent to [EMAIL PROTECTED]";
else
   echo "FAIL";

?>

-----------------------------

And the result was "Mail was successfully sent to
mailto:[EMAIL PROTECTED].

I don't know what z happening..

Thanks in advance.

-Balaji
----- Original Message -----
From: "Jon Haworth" <[EMAIL PROTECTED]>
To: "'Balaji Ankem'" <[EMAIL PROTECTED]>
Sent: Tuesday, January 08, 2002 3:35 PM
Subject: RE: [PHP] no one can find solution to my problem??


> How have you got it all set up?
>
> Are you running sendmail on localhost, or are you sending stuff to your
ISPs
> mail server? If it's the latter you mail be better off opening an SMTP
> session and talking directly to the server, rather than using mail().
>
> Cheers
> Jon
>
>
> -----Original Message-----
> From: Balaji Ankem [mailto:[EMAIL PROTECTED]]
> Sent: 08 January 2002 10:04
> To: Jon Haworth
> Subject: Re: [PHP] no one can find solution to my problem??
>
>
> Hi, Jon
>   Thankyou for u'r reply.
>   But our mail server needs authentication.(username and password)..
>
> I am trying this from last 6 months..but still I couldn't find any
solution.
>
> -Balaji
> ----- Original Message -----
> From: "Jon Haworth" <[EMAIL PROTECTED]>
> To: "'Balaji Ankem'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, January 08, 2002 3:09 PM
> Subject: RE: [PHP] no one can find solution to my problem??
>
>
> > > $headers .= "Cc: mailto:[EMAIL PROTECTED]\r\n;
> > > $headers .= "Bcc: mailto:[EMAIL PROTECTED]\r\n;
> > > $headers['User']='bankem';
> > > $headers['Password']='narayana';
> > >
> > >
> > > /* and now mail it */
> > > mail($to, $subject, $message, $headers);
> > >
> > > ?>
> > >
> > >
> > > Warning: Server Error in c:\www/email1.php on line 45
> >
> > You do not need to send your username and password with the headers -
> those
> > are the MAIL headers (From, Reply-To, Errors-To, etc)
> >
> > Cheers
> > Jon
> >

-----------------------------------------------------------------------------------------------------------------------
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.
------------------------------------------------------------------------------------------------------------------------

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to