Have you tried without the ajax? Is that where you’re actually sending the mail? Try just putting the wp_mail function right under headers and see if you get the mail.
Also i agree with theDeadmedic. It could be spam. Check the google spam folder and if its’ not there, try sending to an email on your own domain (as long as it’s not using googles servers)
Also, I always add content-type to my header to help reduce the spam flag. It may help you:
$headers = array('Content-Type: text/html; charset=UTF-8');
$headers[] = 'From: CMCENTERS <[email protected]>';
Related Posts:
- wp_mail 200 response but no mail sent
- wp_mail script with jQuery post
- How do I call wp_mail from HTML?
- WordPress ajax success response
- PHP 8, AJAX mail form to function.php doesn’t work
- contact form ajax empty response error message
- Wp mail does not work when Ajaxed to
- wp_mail doesn’t work when logged in?
- Send email via ajax
- Contact form – ajax, wp_mail
- need a confirmation text to appear on email submission
- Add Server Side validation in Ajax mail form
- How to send automatic response after form submission without plugin
- Sending email through Ajax without page refresh hangs on admin_ajax.php
- Adding user using admin ajax by a user with custom role
- How to send the checkbox value to email
- WordPress Ajax JSON success return no being recognized
- Run PHPMailer function after ajax function completes that adds row to custom table
- How to make Contact Form 7 work when injected via AJAX in WordPress?
- PHP “php://input” vs $_POST
- Google Maps API throws “Uncaught ReferenceError: google is not defined” only when using AJAX
- Access-Control-Allow-Origin error sending a jQuery Post to Google API’s
- Access-Control-Allow-Origin error sending a jQuery Post to Google API’s
- How to solve the error “SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.” in IE
- Show spinner GIF during an $http request in AngularJS?
- Refresh HTML Page in Browser Automatically on Timer – Every 15 Min
- JavaScript implementation of Gzip
- jQuery: Performing synchronous AJAX requests
- ASP.NET MVC controller actions that return JSON or partial html
- jQuery’s .on() method combined with the submit event
- Ajax takes 10x as long as it should/could
- Sending multipart (text/html) emails via wp_mail() will likely get your domain banned
- Why won’t wp_mail() let me set the From: header when plain old PHP mail() will?
- How to check if I am in admin-ajax.php?
- How to set SMTP programmatically
- Best way to end WordPress ajax request and why?
- How to load wp_editor() through AJAX/jQuery
- How to cache json with wp-super cache
- Load minimum WordPress environment
- Why use wp_send_json() over echo json_encode()?
- Why use admin-ajax.php and how does it work?
- WordPress refuses to send mail, “…your host may have disabled the mail() function”
- How to get a unique nonce for each Ajax request?
- Do something after sending email
- Open a Thickbox with content trough AJAX
- Initialize TinyMCE editor / visual editor after AJAX insert
- Why not register shortcodes if is_admin dashboard?
- WordPress AJAX with Axios
- Why is die() used at the end of function that handles an Ajax request?
- Why might a plugin’s ‘do_shortcode’ not work in an AJAX request?
- Making my AJAX powered WordPress Crawlable
- How to add headers to outgoing email?
- Is there a JavaScript API? How to access public and private data in JS?
- Get Previous & Next posts by Post ID
- failed to load wp-admin/admin-ajax.php
- Using Backbone with the WordPress AJAX API
- Using Ajax with a Class file
- Ajax in a settings page (update_option is undefined)
- How to pass data parameter to ajax action function handler
- WordPress Ajax Data Security
- Displaying PHP Errors from admin-ajax.php
- wp_set_auth_cookie() doesn’t work in Ajax call
- gettext does not translate when called in ajax
- Execute one AJAX request after another AJAX request finished
- WP-AJAX vs WP REST API: What to use for requests to the website from outside?
- Ajax and autocomplete
- wp_mail and BCC headers
- How to add to cart via AJAX Woocommerce [closed]
- Nonces and Cache
- SSL breaks customizer: page isn’t returned from ajax
- Why is a 500 error generated by admin-ajax.php not going into the Apache error log?
- Are ‘wp_ajax’ and ‘wp_ajax_nopriv’ exclusive to authenticated and non-authenticated users?
- How to HTML5 FormData Ajax
- admin-ajax.php vs Custom Page Template for Ajax Requests
- How to override WP_DEBUG for Ajax responses?
- Stop admin-ajax?
- redirect out of wp-admin, without losing admin-ajax.php
- Call to undefined function add_action()
- Is it safe to assume that a nonce may be validated more than once?
- How do I override the Message-ID header of wp_mail function?
- Including WordPress in RESTful API
- Multiple ajax nonce requests
- Get posts with ajax
- admin-ajax.php doesn’t work when using POST data and Axios
- How to call a PHP function with Ajax when the user clicks a button
- REST API endpoint for elasticpress autosuggest
- Ajax for non-logged-in users
- Contact Form 7 Custom Post Action
- Custom Form with Ajax
- How to process ajax requests correctly using ajax plugins
- wp_mail – Remove sitename from email subject
- ajax – why multiple calls to wp_create_nonce() return same value?
- Update user meta using with ajax
- Registering AJAX callback function that is part of a class without instantiating the class in function.php
- WordPress function that makes HTML safe to be sent via AJAX request
- How do I hook an Ajax request into a PHP callback?
- AJAX request on the frontend always returns 0 if user is not admin
- admin-ajax.php returns 0. How do I debug it and fix it?
- Ajax requests without JQuery
- Admin Notification after save_post, when ajax saving in gutenberg