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
- Access-Control-Allow-Origin error sending a jQuery Post to Google API’s
- JavaScript implementation of Gzip
- Why won’t wp_mail() let me set the From: header when plain old PHP mail() will?
- Do something after sending email
- WordPress AJAX with Axios
- Why might a plugin’s ‘do_shortcode’ not work in an AJAX request?
- How to add headers to outgoing email?
- Get Previous & Next posts by Post ID
- Nonces and Cache
- REST API endpoint for elasticpress autosuggest
- ajax – why multiple calls to wp_create_nonce() return same value?
- Using ajax on categories and wordpress loops
- WordPress Nonce Issue for Ajax Login and Logout
- How to modify wp_ajax function?
- Vue.js + AJAX Shortcode
- Turn jQuery.ajax() request into XMLHttpRequest (vanilla JavaScript)
- wp_remote_get() to get AJAX url /wp-admin/admin-ajax.php
- Can’t seem to get wp_localize_script to work
- How to add line breaks to $email[‘body’] when using auto_core_update_email hook
- Ajax – gettext without a plugin
- update_user_meta doesn’t work with AJAX
- How do I set the url to make an ajax request for a html document?
- Ajax stops working when logged in?
- WordPress ajax get content post id
- Using wp_handle_upload and media_handle_sideload with ajax
- Populating content dynamically via AJAX and Advanced Custom Fields [closed]
- Create Page With wp_insert_post() and AJAX
- How to know what page is calling admin-ajax.php?
- Populate a Map at The Same Time as showing Posts via AJAX
- Get wp_title wp ajax
- Why Does WordPress not output admin-ajax.php path by default?
- Ajax custom search not functioning as expected
- Jetpack Infinite Scroll – Add more than 7 posts each time?
- Speed/Performance difference between `wp_ajax` and `init` checks for AJAX/POST requests?
- Remove trailing 0 from function that is used both statically and dynamically
- How to load next and previous posts by Ajax
- Update attachment metadata fails
- Nonce fails on ajax save
- WordPress ajax works on FF but not on IE & chrome
- Disallow second login session
- WordPress P2 live problem
- POST Ajax bad request
- Getting a variable using $post ajax back from php to js response in WP
- AJAX Call – Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- WordPress is Not Setting PHP $_POST on Custom Ajax
- Prevent sending emails on user creation in OOP context?
- bulk update meta value with ajax
- Ajax for subscibers not working
- javascript ajax and nonce
- Chained ajax call, second call returns 0
- How to create a form button that executes a function?
- i’m trying to get all my media query attachments via ajax in wordpress
- Distinguish between 2 instances of admin-ajax.php
- How to update post with Ajax (no plugin)
- Including ‘wp-load.php’ after another include() generates an error
- How to make pages that arent indexed for ajax applications
- edit user input data contact form 7
- How to keep scripts persistent during admin-ajax process when saving widget?
- Very weird bug: Ajax for non-admins
- jQuery ajax method does not return data
- WordPress 403 error on form submission with Ajax
- wp_mail send multiple emails in a loop
- I am getting Admin-ajax.php 400 Error
- Ajax and get_template_part
- Can’t change headers / From for wp_mail()
- Download doccument on server rather than clients browser
- How to require files in a custom endpoint
- Load oEmbed iframe within ajax call
- Adding pagination to Ajax Query
- Get post details with pure javascript ajax
- WorddPress website admin part not working correctly – I think ajax/json issue
- check_admin_referer fails on new AJAX plugin uninstall with “Are you sure you want to do this?”
- Ajax Security regarding user priviliges and nonces
- How to populate data from JSON using AJAX in TypeScript? [closed]
- How to use nonces for frontend AJAX voting if the page gets cached?
- Objects and get_post_meta() gives me 1 string for latitude and longitude
- Why can wordpress not find the actions I add in my constructor?
- delete attachment for one post without deleting actual attachment post
- wp_editor() in content that was loaded with ajax [duplicate]
- Facebook Pixel + WooCommerce + AJAX = Confusion
- Send button using own contact form [closed]
- wp_mail attachment not working in wordpress