update mail sending condition
add html version
AllowNilToKeyOnUser