Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to send email using AJAX request?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 247
    Comment on it

    Hello Reader's If you need to make ajax request that send the email in backgournd page then you can use the code below:-

    $('#submit').click(function() //specify your selector of form
    {
        $.ajax({
            url: sendemail.php, // your action page
            type:'POST',
            data:
            {
                email: emailaddress,
                message: message
            },
            success: function(msg)
            {
                alert('Email Sent');
            }               
        });
    });
    

    Benefit of using this page is your current page will not be refreshed. While the form is submitted via POST

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: