$(function () {
    $('#check_btn').click(function () {
        var email = prompt('Enter email for testing', '{admin_email}');
        if (email) {
            $.post('/ajax/emailmng/emailmng_admin/check', {'email': email}, function (data) {
                if (data.sent) {
                    alert('Test email successfully sent');
                } else {
                    alert('Fail');
                }
            });
        }
        return false;
    });
});