Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8112653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:34:30+00:00 2026-06-06T02:34:30+00:00

I am trying to send email using AJAX and PHP but no success:( My

  • 0

I am trying to send email using AJAX and PHP but no success:(
My success function alerts me that it is WORKING but i get nothing in my mail box. PHP form is located in my ROOT folder and it is working so i know it is not PHP problem.
Been trying for hours to solve this but no effect. Can someone help out? THX!!! This is what my console.log shows:


name=MY NAME&email=dejo.dekic@yahoo.com&message=SOME MESSAGE
pagepays.js

POST http://www.homepagepays.robertpeic.com/kontakt.php 200 OK 284ms
My jquery code looks like this:

      $('#button').click(function(){
      var name = $('#name').val();
      var email = $('#email').val();
      var message = $('#message').val();

      var data ='name=' + name + '&email=' + email + '&message=' + message;
      console.log(data);
      $.ajax({
      type:"POST",
      url:'kontakt.php',
      data: data,
      success: function(){
      alert('Working!');
      }

      });
      return false;
      });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T02:34:31+00:00Added an answer on June 6, 2026 at 2:34 am

    You might need to URI Encode your passed values. If any of the fields have = or &, it could throw your URL Off. Of course, based on my comments above, I think you should serialize your Form and encode that, it can also be done your way.

      var name = encodeURIComponent($('#name').val());
      var email = encodeURIComponent($('#email').val());
      var message = encodeURIComponent($('#message').val());
    

    JSFiddle: http://jsfiddle.net/UXZQk/5/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to send email using PHP mail. I get the following error:
I am trying to send email using mail() in php. I need the message
I am trying to send email using smtp authentication through google but I am
I am trying to send an HTML email using Perl. open(MAIL,|/usr/sbin/sendmail -t); ## Mail
I am trying to send an email in ASP.NET using system.net.mail the problem is
I'm trying to send an email using swift_smtptransport that will connect to 127.0.0.1:25 I'm
I am trying to send an email (using Outlook mail) from a jsp page.
I am trying to send email - which is working correctly, but my Click
I am trying to send Email using telnet and smtp.mail.yahoo.com server. when I try
I am trying to send an email (through gmail) using python script that someone

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.