I am using smtp to send emails by php. My client has a shared hosting. I created an email account there.
There is not information available about what will be the smtp server for this account. I have tried : smtp.domainname.com But its not able to connect.
How can i figure out my smtp server host? any idea?
You can use the dig/host command to look up the MX records to see which mail server is handling mails for this domain.
On Linux you can do it as following for example:
(as you can see, google has quite a lot of mail servers)
If you are working with windows, you might use nslookup (?) or try some web tool (e.g. that one) to display the same information.
Although that will only tell you the mail server for that domain. All other settings which are required can't be gathered that way. You might have to ask the provider.