I'd move when locale is defined to just before _make_mail is called.