This function did not define "s" properly
Merge pull request #311 from adamrp/email_fix

NOT URGENT: This function did not define "s" properly