php-install | 2004112
Date: 11/30/04
- Next message: eric <email protected>: "[PHP-INSTALL] Re: Approved document"
- Previous message: Hendrik Schmieder: "Re: [PHP-INSTALL] DOMXML doesnt run under win32 / PHP 4.3.9 / apache 2.0.52"
- In reply to: chandrika raju: "[PHP-INSTALL] Problem with Mail() function"
- Next in thread: Hendrik Schmieder: "Re: [PHP-INSTALL] Problem with Mail() function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
chandrika raju schrieb:
>
> Hello Everybody,
>
>
> When I try to use mail() function it is not working.
> This is my program:
>
> <?php
> $to="ckp <email protected>";
> $from="me <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
- Next message: eric <email protected>: "[PHP-INSTALL] Re: Approved document"
- Previous message: Hendrik Schmieder: "Re: [PHP-INSTALL] DOMXML doesnt run under win32 / PHP 4.3.9 / apache 2.0.52"
- In reply to: chandrika raju: "[PHP-INSTALL] Problem with Mail() function"
- Next in thread: Hendrik Schmieder: "Re: [PHP-INSTALL] Problem with Mail() function"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

