fix cancel button issue
add load setting logic
update max email logic