Add debug log output function

Add email function debug log output function , and store all email
params in txt, not hardcoding