One installation on vps which I moved from the shared hosting is working fine. It was working well on shared too. I moved to vps due to login as another user problem.
But another new installation on the same shared hosting is not working. I tried installing on another new shared hosting (both manually and using softaculous). Everything works except mails. Webmails, wordpress mails, phpbb mails all are working well on these two shared hostings. Only q2a is having this email problem.