Critical Error when using WP MAIL SMTP

Is there any kind of help needed from my side?

yep @allroundernaman

Yes. It would be awesome if you can help.

Sure how can I help?

I am having some kind of problem in setting up WP Mail SMTP using GMAIL SMTP server. After completing the whole process of creating and connecting the Google App, when I try to send a test email to myself, the error “There has been a critical error on your website. Please check your site admin email inbox for instructions.” is coming up. I have also provided a screenshot of the error above that you can refer.

Critical Error comes when their is plugin/theme/wp core file corruption issue.
So, please give me a URL so that I can see the error.

Yes. I have followed the steps mentioned by @anon77371365 to debug WordPress and there is no plugin causing errors now.

Please give me URL so I can probably see.

1 Like

Could you enable debug mode in WordPress to see what this “critical error” actually is?

The process to get this error is described in this article too: Installation failed: There has been a critical error on your website - Docs - InfinityFree Forum


None of my installed plugin is causing problems. It is just that when I send a test mail to myself, this error occurs.

Ah! If nothing is corrupt, then maybe the SMTP plugin is corrupt. Try installing another plugin, after deactivating this one.


Had you followed this guide Google Workspace / Gmail
Because I am able to send emails using wp mail smtp plugin. Seems like nothing is wrong.
What is the php version you are using?
What is your site url?


He is not telling anything so how can we start to resolve any kind of error?

1 Like

“Critical error” means something in WordPress crashed. Usually when people see this error it’s because of a botched WordPress core, plugin or theme installation, which corrupted a file loaded on all pages, meaning all pages break.

But in this case, the crash may be caused by a piece of code which is only reached when you try to send an email. But we don’t know without knowing exactly when, where and how it crashes.

So to figure that out, could you please enable debug mode to get the full error message?

1 Like

@anon77371365 how will I know the particular plugin that’s causing the problem?

Correction: The WP SMTP plugin installation is corrupt.
The plugin is fine on my side, so nothing but the installation is corrupted.

Then enable debugging mode by going to wp-config using FTP, and change this code:
define( 'WP_DEBUG', false);
to this:
define( 'WP_DEBUG', true );

Using the method above ^^^


AAAAA, I meant that only @Technical.Legendz
I meant that the plugin files were corrupt during the installation. =_=

Already did that… No problem in installation. No errors were seen… Please refer to the above discussion between me and @anon77371365.

Had you followed this?
Also, can you share your site URL, and can you try reinstallation of wp mail smtp plugin?