Mail notification logic updated