$("#success_alert").hide();

function send_verification() {
    swal({ text: "Sending..", icon: "info", buttons: false });
    fetch("/account/send/email_verification", { method: 'POST' })
        .then(response => response.json())
        .then(data => {
            if (data.message = "success") {
                swal({ text: "Please check your email", icon: "success", });
                $("#success_alert").show();
            }
        });
}