Problem sending mail
| From: | Zoran Lorkovic | Date: | Mon, 30 Aug 2004 21:02:01 +0000 |
| Subject: | Problem sending mail | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-195208@lists.php.net to get a copy of this message | ||
$file = file_get_contents("text.inc");
$start = "[start]";
$end = "[/end]";
$pos_start = strpos ($file, $start);
$pos_end = strpos ($file, $end);
$data = substr ($file, $pos_start, $pos_end);
mail ("myemail@domain.com", "My Subject", $data);
This code works when I call it from browser, but when I call it from command line, $data is not put
into mail
(mail is send but it is empty, without any data in body).
File text.inc looks like this:
[start]some_text_goes_here[/end]
[other_start]other_text_goes_here[/other_end]
Regards.