more email logic. added smtp server to web config. untested