Re: [PHP-INSTALL] Problem with Mail() function

[email protected] (Hendrik Schmieder)
Newsgroups php.install
Message-ID <[email protected]>
chandrika raju schrieb:

>  
> 
> Hello
> 
> Thank you for ur reply.
> 
> It is the problem with SMTP configuration. Itis set to localhost.
> How do I change this to run this program.
> 
> Any suggesstions?
> 
> 
> chandu
> 

You must edit php.ini.

See <http://www.php.net/manual/en/ref.mail.php>

   Hendrik













> On Tue, 30 Nov 2004 Hendrik Schmieder wrote :
>  >chandrika raju schrieb:
>  >
>  >>  Hello Everybody,
>  >>
>  >>
>  >>    When I try to use mail() function it is not working.
>  >>This is my program:
>  >>
>  >><?php
>  >>$to="[email protected]";
>  >>$from="[email protected]";
>  >>$message="Hai\nHow r u?";
>  >>$subject="Hello";
>  >>
>  >>$success=mail($to, $subject, $message, "From:$from");
>  >>if ($success)
>  >>echo "Your mail has been sent";
>  >>else
>  >>echo "There is some error";
>  >>?>
>  >>
>  >>when I execute this, the output is
>  >>There is some error.
>  >>
>  >>That means the mail is not sent.
>  >>So some please help me in getting this. The to address wahtever I 
> gave is a valid address
>  >>
>  >>
>  >>It is urgent
>  >>I thank u on beforehand
>  >>
>  >>Please reply soon
>  >
>  >You can try
>  >
>  >...
>  >$headers = "From: " . $from . "\r\n";
>  >$success=mail($to, $subject, $message, $headers);
>  >...
>  >
>  >
>  >  Hendrik
> 
> 
> 
> <http://clients.rediff.com/signature/track_sig.asp>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.