Re: Problem sending mail
| From: | John Holmes | Date: | Mon, 30 Aug 2004 18:11:12 +0000 |
| Subject: | Re: Problem sending mail | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195176@lists.php.net to get a copy of this message | ||
From: "Zoran Lorkovic" <zoky@unreal-net.com>
$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);
echo $data;
mail ("myemail@domain.com", "My Subject", $data);
Echo is working fine, but mail just send blank message with
subject "My subject" but with empty body message.
What if you try:
mail("myemail@domain.com","My Subject","My Body");
If you see that content, then what's the actual value of $data? If it's HTML, then maybe it's being stripped, hidden, not shown based upon your email client...
Shouldn't the start position be:
$pos_start = strpos($file,$start) + strlen($start);
??
---John Holmes...