How to send a mail in jquery whithout php

You can send an email using jQuery without PHP by using the mailto protocol and the window.open method. Here's an example:

<a href="mailto:[email protected]?subject=Hello&body=This%20is%20a%20test%20email">Send Email</a>

This will open the default email client on the user's device with the specified email address, subject, and body.

Alternatively, you can use a JavaScript library like jQuery Email to send emails without PHP. Here's an example:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.email.min.js"></script>

<button id="send-email">Send Email</button>

<script>
  $(document).ready(function() {
    $('#send-email').on('click', function() {
      var email = {
        to: '[email protected]',
        subject: 'Hello',
        body: 'This is a test email'
      };
      $.email.send(email, function() {
        alert('Email sent successfully!');
      }, function(error) {
        alert('Error sending email: ' + error);
      });
    });
  });
</script>

This code uses the jQuery Email library to send an email to the specified address with the specified subject and body. The send method takes three arguments: the email object, a callback function to handle success, and a callback function to handle errors.

Note that this method is not suitable for sending emails programmatically, as it relies on the user's default email client and may not work in all browsers or environments. For more robust email sending, you may want to consider using a server-side language like PHP or a third-party email service.