big changes in which emails to sent in what situations

only allow scan_date updated when it is null
and other small changes