7 Minute Miles

Fixing admin email on 7 Minute Miles


Finally spent some time to remove a blog-related item that’s been on my personal to do list for a long, long time. WordPress websites have the ability to send out emails for various tasks, but the web server needs to support sending mail. I’ve been using a plugin from Noor Alam called Gmail SMTP that uses Google’s email infrastructure to send messages and that worked great when I was hosting 7minutemiles.com email using Google Apps for Domains. When that service was no longer free, I moved my email over to Apple and knew that broke the plugin and I would need to find another solution.

Fast forward two years (oops). Had an idea of signing up for a free general Gmail account and tying that address to the old plugin. Headed over to the gmail.com signup page and found that 7minutemiles@gmail.com was available, so I grabbed that. Next, I needed to go to the Google Developers Console and follow the instructions on the plugin howto page. That was mostly straightforward and I was able to get a green SMTP connected icon on the plugin settings page. The Test Email tab, however, gave me the following error:

There has been a critical error on this website. Please check your site admin email inbox for instructions.

Since admin emails were not being sent, there was nothing in the site admin email inbox. The comments on the howto page had a great suggestion, though – check the logs. Looking at /var/log/nginx/error.log, I saw this reference to curl:

2024/02/19 05:50:47 [error] 163214#163214: *464402 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function curl_init() in /var/www/7minutemiles.com/wp-content/plugins/gmail-smtp/class.phpmaileroauthgoogle.php:179

Checking on my PHP config page, sure enough, curl was not installed. That was quickly fixed with this:

sudo apt install php8.2-curl

All is right in the Gmail SMTP world again: Google SMTP server + OAuth 2.0 protocol + TLS encryption…

Originally published by DK on February 19, 2024 at 1:29 pm in Housekeeping, Longform, Technology


flourish icon