sendmail is very easy to install and use with php on linux. But it could be slow by default configuration. The reason which I ran into is because the server doesn’t configured with a qualified host name and it keeps retrying. To fix the issue:
and set the ip for your domain like this:
I haven’t got the whole picture of this, but this quick fix does work. Hope it could also help you if you are demand a quick solution.