I’d try a simple wp_mail() snippet that will test if the wp_mail process is working properly:
wp_mail( '[email protected]', 'The subject', 'The message' );
I also saw a note in the wp_mail in WP Codex that some hosts will require a ‘[email protected]’ mail account created before it will send out the message.
Take a look at the dev pages here https://developer.wordpress.org/reference/functions/wp_mail/ . Note that you may need to set up the wp_mail_from() value to specify the ‘from’ address.
Also, when you send the test to your own email, check your spam/trash folders for interception.
Plus, of course, sanitizing the input from your form fields.
Related Posts:
- WordPress refuses to send mail, “…your host may have disabled the mail() function”
- WordPress “phpmailer_init” not working for me
- How do I override the Message-ID header of wp_mail function?
- WordPress new user / forgot password emails are broken
- wp_mail function timing out
- Why is my get_post_meta always empty
- Should I use wp_mail or PHP’s mail? [duplicate]
- Mail not sent when I set HTML headers
- Error when requesting password reset email – wp authentication
- Woocommerce HTML email option unavailable
- Processing a subscription form with POST method?
- Different Webhost and using Google Mail server: Is there a better way than SMTP?
- Validate emails in array using foreach
- Redirect to another page after submission using wp_mail
- PHP 8, AJAX mail form to function.php doesn’t work
- How to retrieve the sender email with wp_mail()?
- wp_mail file attachment not being placed in upload folder?
- Website needs to be opened for wp_mail to work
- Notify users only on post publish
- Sending a custom form data in email through WP Mail Function
- Pass Variables or Variable Place-Holder from Editor to PHP
- Pass return-path additional parameter in wp_mail
- Send notification email to admin for every new post published
- Different SMTP based on domain
- Get page permalink in contact form
- comment_post (if comment is approved OR $comment_approved === 1) not working?
- Running SMTP Conditionally
- Including user data in “new user notification email”
- Cron not sending wp-mail()
- Email always ends up in spam
- Premature end of script headers: wp-mail.php?
- Adding action item to admin users table and sending email
- Wp_mail doesnt work
- get_post_meta is always empty when I use wp_mail
- How to show value from ACF plugin field in e-mail?
- wp_mail vs mail functions and header arrays
- Word press – JSPDF – Sending PDF as attachment from wp_mail – Special characters
- wp_mail – send emails after 24 hours from users registration
- Send emails to individual subscribers when CPT post is deleted (trashed)
- Send registration email to all admins
- How exactly do automatic updates work?
- Is it possible to disable a function of a parent theme?
- Variables declared in header not available in other includes
- WordPress Ajax always returns a 404 error
- Displaying a variable stored in functions.php inside widget
- Custom Meta Field – Youtube embed
- Need to get specific data from array
- How to get all existing post types
- PHP code to call image Caption, Alternative Text, and Decription?
- How to rewrite URL with PHP variables with htaccess to a normal looking URL?
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- Can’t get wp_insert_post to work
- Why not yield/iterable in posts interface?
- How to: PHP Log Out Link?
- PHP Fatal error: Uncaught mysqli_sql_exception: Table doesn’t exist in wordpress/wp-includes/wp-db.php
- code is skipping a div
- Avoid parallax images hardcoding
- The response is not a valid JSON response, wordpress problems?
- Firing schema via code in functions.php doesn’t work
- How to use wp_add_inline_style for custom CSS added via shortcode?
- Dot is not added at the end of href
- meaning of (array)function()
- Accessing $post after PHP is executed
- Can a page contain php code?
- Last class on last headline?
- How to relocate paypal button gateway on checkout page in woocommerce
- Passing the name of selected color from the custom component to `render_callback`
- your php installation be missing the MySQL extension WordPress CPANEL [closed]
- Admin submenu issue with PHP not detecting two strings as equal
- WordPress mod_rewrite not working on php fpm
- How do I pull information from one wordpress backend into another? [closed]
- Adding data to custom wordpress database table
- How to add videos on my home page slider?
- select a single val though a table in wordpress
- How can I enter on the Thank you page in woocommerce the discount code I assigned to the product category?
- PHP inside echo HTML
- Filter ‘comment_notification_text’ not working
- How do I check if a product is in two categories?
- oceanwp+woo mobile cart sidebar text
- Check if current post in loop is last on current page
- wordpress contact form messages not sending although it saying they were sent successfully with this php code
- Find out div class
- Add a top bar to a wordpress theme without editing the header.php file?
- Using a PHP form, get the page title or any other element in the sent e-mail
- Custom field in PHP file
- How do I fix Undefined variable using $_POST in function?
- Check the database for a postmeta field
- Random code snippet showing up in browser
- How to display dual language menus and headers?
- Help hooking into user_register
- Featured Products not showing up in “Featured” area of homepage
- How to hide the Duplicate taxonomy values in WordPress?
- How can I include tags in wordpress search without a plugin
- Retrieve $_POST data to send to javascript without using localize script
- Search bar for page that searches only particular page IDs
- Redirect homepage /page/1/ to /blog/page/1/
- if conditional in sidebar plugin Password content shortcode
- Excerpt all post content Content Same Size without word cutting off
- How do I display WooCommerce products in my query to rows of 3?
- How to temporarily set the featured image for a post when the post is loaded