504 Timeout while reading response from Server
Mail function takes more time and its showing "504 Timeout while reading response from the server"
A 504 error happens when the server does not receive a timely response from another server that acts as a gateway or proxy, so the request times out. This is usually related to an issue with an upstream server or the network connection.
You may want to check for network issues between the servers using MTR reports. This may help you identify a problem along the route that may be causing the connection to timeout.