> Richard,
> The problem is with the str_replace()s. Consider the following:
>
> $myvar = 'this is a var.';
> $mytext = str_replace('is', 'is not', $myvar);
> ?>
>
> At this point $myvar still equals 'this is a var.' but $mytext is 'this is
> not a var.' $myvar hasn't been modfified by
Richard,
The problem is with the str_replace()s. Consider the following:
At this point $myvar still equals 'this is a var.' but $mytext is 'this is
not a var.' $myvar hasn't been modfified by the str_replace so any
additional str_replace()s after it will not have a cumlative effect.
Mr. Kurth,
Try this. Save the mail
template to another file [like mailtemplate.txt] then open it for
reading.
//read in template
$template =
file("mailtemplate.txt");
//setup variables
$fullname="Richard
Kurth";$email="[EMAIL PROTECTED]";$hostdomain="northwesthost.com";
$hostn
Hi Richard,
You are replacing the placeholders in $mail_template, but you are storing
the results in $mail_content.
> $mail_content = str_replace('##fullname##',$fullname,$mail_template);
> $mail_content = str_replace('##email##',$email,$mail_template);
This means that each time you call the st
4 matches
Mail list logo