Symptoms
When trying to send an email using webmail the email send is very slow and potentially errors after time.
Description
This typically occurs due to DNS lookups called DNS recursion. On a Linux server, the recursion servers are typically stored in /etc/resolv.conf
Workaround
The best approach is to contact your server/service provider and ask what recursion servers are available in the data center used to host the server. If this is not possible or may take too long then you can use publicly available recursion servers.
The two most common ones are the Google recursion servers
8.8.8.8
8.8.4.4
and Cisco OpenDNS servers
208.67.222.222
208.67.220.220
To add any of these you would modify /etc/resolv.conf and before any nameserver, line add for example
nameserver 208.67.222.222
nameserver 8.8.8.8
and then save the file.
Then test sending email again.