Fix for Tracker 31973

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=31973&start=0

Infinite loop if send mail is used during installation