JishnuRaj I see you have taken the website offline, but if you are still experiencing the issue here's what you can do.
Can you check your logs at <flarum>/storage/logs for the full error ?
Most likely it's mail related. You could try switching to SMTP.
JishnuRaj I'm using flarum on a sub directory of my main site
You probably meant subdomain ?