$(document).ready(function () {
var b = /^[.a-z0-9_-]+@[a-z0-9-]+\.([a-z]{2,6}\.)?[a-z]{2,6}$/i;
....
var sps = mail.split('@');
var domain = sps[sps.length - 1];
var domains = ['main.ru', 'yandex.ru', 'gmail.com'];
if (domains.includes(domain)) {
// все ок
}