I have an email system, where user write a message and it will send the message. The main problem which I just found, consider this code
$findEmail = $th
If (ever) an template hast been in $getUserEmailTemplate, you did overwrite (destroy) it with this line;
$getUserEmailTemplate
$getUserEmailTemplate = "@@MESSAGE@@";
So just remove this line and make sure, $getUserEmailTemplate really contains anything and best of all a template.