in reply to close statement issue

Methinks there's another clue in your post. If, indeed, by
My sendmail stopped working in my CGI web page...
you mean that it did work (as you expected) at some time in the past and no longer does so, what's changed; what's been upgraded or trashed?

In addition, perhaps you'll tell us -- as others have at least implicityly asked -- what the actual error message is (are?).