Posted by slimdizzy on 08/04/06 18:24
magic_hat60622 wrote:
> hi all. I have an html file that I need php to read and send as an html
> e-mail. The file contains standard html and also some variable names
> that I want php to interpolate:
> <html>
> Hi there. my name is $name
> </html>
>
> I'm reading the file like so:
> $fh=fopen('./emails/confirmation/index.html', 'r') or die
> ($php_errormsg) ;
> while (! feof($fh)){
> $body.=fread($fh,filesize('./emails/confirmation/index.html'));
> }
>
> PHP is not interpolating the variable names in the email. Solutions?
>
> -Magic
Why not just put the html of the message you want to send into a
variable in that script??
Are there reason why your reading a file for such a small amout of
text/html??
Just seems to be more work then needed unless you have users making
these files and want them to be in a static place for your script to
read from.
[Back to original message]
|