Design->Dir->Mails.$template.'.html'; $handle = fopen ($filename, "r"); $contents = fread ($handle, filesize ($filename)); fclose ($handle); foreach($record as $key => $value) { $contents = str_replace( '{{'.strtoupper($key).'}}', nl2br($value), $contents ); } $contents = str_replace( '~/', $GLOBALS['Conf']->Site->Domain, $contents ); return $contents; } ?>