Why does it take like forever to send an email when i request a mail service on port 25(smtp) through a php program? I used "fsockopen" to connect to the mail server which is on the same domain and allow relay for the web server.
In php, I open the socket once with a while loop to change "MAIL FROM:< ..>", "RCPT TO:<....>" and corresponding "DATA", so I can send several emails at once. However, it takes like forever to finish sending those emails. (Sometimes it even stuck and hang there.)
It used to work fine in this way. However, ever since I modified the "/etc/hosts" and "/etc/nsswitch.conf" on both mail server and web server, I couldn't get it back to work as before.
Pretty much confused with the need of DNS(nslookup and domain name resolve) for the type of services of TCP/IP.
Thank you for your help.
Jessica