Re: Problem with Mail() function
| From: | Hendrik Schmieder | Date: | Tue, 30 Nov 2004 10:45:30 +0000 |
| Subject: | Re: Problem with Mail() function | ||
| References: | 1 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-14847@lists.php.net to get a copy of this message | ||
chandrika raju schrieb:
Hello Everybody,You can try ... $headers = "From: " . $from . "\r\n"; $success=mail($to, $subject, $message, $headers); ... HendrikWhen I try to use mail() function it is not working.This is my program: <?php $to="ckp@yahoo.com"; $from="me@mail.com"; $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