<script src="plugins/sweetalert/sweetalert2.all.min.js"></script>
<!-- <link rel="stylesheet" href="plugins/sweetalert/sweetalert2.min.css"> -->
<script>

$(document).ready(function() {

        $('#newsletter-form').validate({
            ignore: [],
            rules: {
                newsletter_email: {
                    required: true,
                    email: true,
                    nohtml: true,
                    maxlength: 190,
                }
            },
            messages: {},
            errorPlacement: function(error, element) {
                error.insertAfter(element);
            },
            submitHandler: function(form) {
                var regsubssmtval= $('#regfsmt').val();
                var subscribeemailval = $('#newsletter_email').val();

                $.ajax({
                type: 'POST',
                url: 'newsletter.php',
                data: { regsubssmt : regsubssmtval, subscribeemail : subscribeemailval },
                beforeSend:function(){},
                success:function(result){
                    // $('#spinner').removeClass('show');
                    result = JSON.parse(response);
                    if (result.status == 200) {
                            Swal.fire({
                            title: 'Success!',
                            text:response.message,
                            icon: 'success',
                             confirmButtonText: 'Close'
                            });
                    } else {
                        Swal.fire({
                            title: 'Error!',
                            text: result.msg,
                            icon: 'error',
                             confirmButtonText: 'Close'
                            });
                        }

                    },
                    error:function(){
                    //clearconsole();
                    toastr.error("Error Occured. Please Try Again Later.");

                    }
                    });

                    $('#newsletter_email').val('');

            }


        });
});
<?php
// $_SESSION['msg_err'] = "aaaa";
if (isset($_SESSION['msg_succ']) && $_SESSION['msg_succ'] != '') {

    ?>

Swal.fire({
  title: 'Success!',
  html: "<?php echo $_SESSION['msg_succ']; ?>",
  icon: 'success',
  confirmButtonText: 'x',

customClass: {
confirmButton: 'top-right-button',
    }


});

<?php $_SESSION['msg_succ'] = '';unset($_SESSION['msg_succ']);
} elseif (isset($_SESSION['msg_err']) && $_SESSION['msg_err'] != '') {

    ?>

Swal.fire({
  title: 'Error!',
  html: "<?php echo $_SESSION['msg_err']; ?>",
  icon: 'error',
  confirmButtonText: 'x',

customClass: {
confirmButton: 'top-right-button',
    }
});
<?php $_SESSION['msg_err'] = '';
    unset($_SESSION['msg_err']);
}?>
</script>