Two things... first you need to declare globals for any objects that are created on the main page and referenced in the email body, so you have to add this to the top of the page:
<?php
global $segufix, $rscontent;
?>
Then on the line referenced in the error you have:
if (!$segufix->IsEmpty()); {
It shouldn't have the semicolon... it should just be:
if (!$segufix->IsEmpty()) {