mat
|
| Posted: 07/10/2002, 1:29 PM |
|
i'm trying to generate a dynamic content for body email. But i'm not sure how can i do this? Can someone give me some tips on how to do these or show me the sites that have some information for my problems.. thanks
|
|
|
 |
Chris K.
|
| Posted: 07/10/2002, 3:34 PM |
|
Just build your email body as a string.
$body = "Welcome\n";
while ($db...)
$body .= $db->field."\n";
$body .= "Good bye";
Then pass it to the sending function/component as body string.
You could also keep email body in the database for changing it through administrative area. Put some placeholders inside message text for dynamic content and replace them before sending:
Body in database could be:
Welcome,
{listing}
Good bye
You can fill it using:
$body = Dlookup(...);
while(...)
$listing .= ....;
$body = str_replace("{listing}",$listing,$body);
<send $body>
|
|
|
 |
|