fixed namedtuple/dictionary error in sending out e-mails