No emails in inbox

Q: Date/Time this occurred (Provide your time zone also)
A: Today, 11:46am PT

Q: DevKinsta Version

Q: OS Version
A: MacOS Monterey 12.4

Q: Docker Desktop Version
A: 4.10.1 (82475)

Q: Were any error codes or messages observed? If so, what were they?
A: No errors

Q: Detailed Description of the Problem
A: My code uses wp_mail which returns true. No email appears in the inbox.

Hi @sccr410, thanks for reaching out.

Does basic mail functionality like the admin password reset work? A simple test would be to add this snippet to the bottom of your site’s main index.php and and then refresh a page/check your mailbox:

wp_mail( '', 'The subject', 'The message' );

To rule out code issues you could also create a brand new WP site in DevKinsta to see if it also has wp_mail issues.

Password reset worked, the wp_mail() in the header.php of the theme worked. No form plugins (like Gravity Forms) or my custom plugin that also calls wp_mail() and returns true seem to work.

Just a suggestion to use for example the “WP Mail SMTP” plugin, especially if you are looking to use something like that in the final version of the site anyway (it is so much better than the default Wordpress mail system).
Using WP Mail SMTP will allow your local dev site to send actual emails that land in your normal email inbox, which is convenient and better for testing how email templates look in the inbox (if you are using any).

1 Like