Cloudways SMTP Setting: A case on Troubleshooting

Recently, a client contacted me regarding a WordPress installation that has its Contact Form 7 (CF7) not sending emails. The installation was served on a Cloudways Hosting Platform (CHP). CHP has a feature that sends email via gmail’s SMTP.

SMTP stands for Simple Mail Transfer Protocol. When you send an email, your server simply uses the SMTP Protocol to connect to the recipient’s email server. So your server will be able to transmit your email content towards that server.

As with every troubleshooting, I would start with the obvious and move one step at a time to the least obvious. So based on experience, I see that the CF7 should be the best starting point.

Testing CF7

The client told me that the website sent the emails before and then suddenly stopped sending. This happened several days ago. So, I checked the CF7 and look for the forms. Good thing, it has only one form.

So I logged into the admin panel then checked the sending tab and set my email to the recipient. This is to confirm that it does not really send emails. After that, I opened the front end’s form, filled it up and send.

I waited for a while then checked my email. But, I did not receive the expected email.

The next logical way would be to check the server. Before that though, I needed to check the Cloudways panel.

Cloudways Panel

So I asked the client for access to his Cloudways panel. He invited me so I was able to log in.

Right under Servers menu > then selecting the server > then SMTP, we’d see the following:

Cloudways Server SMTP Setup
Server’s SMTP setup

I told the client to click “Update” and then input his credentials (gmail username and password). He replied that he already did that previously. So, if he did that and all his credentials are OK, then it would be better if we go to the server and check using SSH.

With some clicks on his Cloudways panel via Applications > Select what application > Access Details, I added an SSH user.

Cloudways Application Credential to ADD an SSH user.
Application Credentials add an SSH User

I encountered a problem when I cannot SSH. The server responded with:

 ssh_exchange_identification: read: Connection reset by peer 

SSH to Server

I searched the internet and found a solution here. Particularly, the solution is the one that discusses the connection error to cloudways. The cause of that error by the way, is having my IP blacklisted. So I whitelisted my IP and that is it: I was able to do secure shell to the server.

Using my bash shell, I used SSH to connect to the server. Since, the server in Linux, my knowledge on basic linux commands came to life when I navigate to the different directories of that server.

I then did the mail command to see if I can send an email. The command is like this:

> mail -s "This is the Subject"
This is the body of the email.

this is a test to see if the email works.

To end the body of the email, use CTRL+D.

The mail command will not give you a response, but you can see the emails on queue with the command: mailq. The response I saw with the command shows me the culprit.

mailq command result showing mails not yet sent.
Result of the Mailq command

There were several emails on queue. The two most common reasons as enumerated were:

(delivery temporarily suspended: connect to[2404:6800:4003:c02::6                                                                                                                                                                                               d]:587: Network is unreachable)


(delivery temporarily suspended: SASL authentication failed; server om[XX.XX.XX.XXX] said: 535-5.7.8 Username and Password not accepted. Learn more at?535 5.7.8 v9smXXXX016pfg .144 - gsmtp)

Upon observation, the username and password is really the culprit. So, I told the client about it. I further told that it could be possible: he entered the right credentials on the onset. But, later on he changed password on his gmail.

“And that is it.” He said. He remembers.

So there you go. A few days ago, he changed his password on gmail. His Cloudways applications cannot access his gmail SMTP since the passwords don’t match anymore.

Please follow and like us:

TMUX Essentials

I got introduced to tmux when I joined a seminar on Docker. While listening to the speaker going through the topics, and seeing how easily he went through folders in Linux and how he switched between panes – I immediately saw a solution to some problems I have. When I reached home, I got my hands dirty…

From the tmux github repo:

Tmux is a terminal multiplexer. It lets you switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal. And do a lot more.

I keep several apps and services in the cloud. I connect to them via SSH using bash. Working on a terminal and running only one command each line is a headache for me. Much more, when the terminal times out you have to relogin again. Tmux is the solution to remedy these problems.

Currently, the only features from tmux that I’m using is opening several panes. Opening only two horizontal panes will do for me. I can move from one pane to the other. I can edit some codes on one, then move to the other pane to execute commands.

Several commands are available but here are the few that gets me through:

Starting/Ending a tmux server and/or session

>> tmux

Writing this on the Linux terminal will start the tmux server and an unnamed session. This gets me through when I’m on a hurry. But if you want to name it so you can get back to it  later, then you may

>> tmux new -s session_name

If you want to list the current sessions, you may write:

>> tmux list-sessions

The tmux server may be ended with the command:

>> tmux kill-server

Or to kill a session with name session_name you may:

>> tmux kill-session session_name

Tmux Panes and Pane Navigation

Some tmux commands are preceded by Ctrl+B. For example to create a horizontal pane you may write: Ctrl+B ” – which actually could be Ctrl+B Shift ‘.

Pane Commands:
Split current pane into 2 vertical panes: Ctrl+B %

Split current pane into 2 horizontal panes: Ctrl+B "

Show pane numbers: Ctrl+B Q

Shown pane number and go to that pane with pane_number (number designation): Ctrl+B Q pane_number

When traversing two panes, you may go from one pane to another with: Ctrl+B ;

Closing the current pane: Ctrl+B x (You may be prompted to answer y or n)


So there you go. These are the essentials I found so far.

Please follow and like us: