config function send mail