The first bugfix fixes the sendEmail method to return the correct variab...

Fixed two bugs. The first bug is a missing method for handling recursive data structures, which is fixed by implementing the method by extraction, and the second bug was use of undefined variable for return value.