$('#alert-success').hide();

$('#submit-message').on('click', function(){
    var n = $('#name').val();
    var e = $('#email').val();
    var m = $('#message').val();

    $.ajax({
        url: 'https://kapalpintar.com/send_email',
        dataType: 'application/json',
        type: 'post',
        data: {name:n,email:e,message:m},
        success: function(data){
            console.log(data);
        },
        error: function( jqXhr, textStatus, errorThrown ){
            console.log( errorThrown );
        }
    });
})