ID-137: add depednency and base code to send email,
better exception handling,
generate a fixed pin (123456: for testing)