Re: Problem sending mail
| From: | Zoran Lorkovic | Date: | Mon, 30 Aug 2004 18:13:56 +0000 |
| Subject: | Re: Problem sending mail | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195177@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");
This works just fine and I see content.
> 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...
No. Data is simple plain text. I'm using Outlook Express so HTML should also
be visible.
> Shouldn't the start position be:
>
> $pos_start = strpos($file,$start) + strlen($start);
Yes. Well, I got this solved just won't to post main code.
Regards.