fix crash if no mail settings