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?
generally smtp servers name are smtp.yourdomain.com or mail.yourdomain.com open command prompt try to run following two commands
>ping smtp.yourdomain.com
>ping mail.yourdomain.com
you will most probably get response from any one from the above two commands.and that will be your smtp server
If this doesn't work open your
cpanel --> go to your mailing accounts -- > click on configure mail account -- > there somewhere in the page you will get the information about your smtp server
it will be written like this way may be :
To automate the answer of @Jordan S. Jones at WIN/DOS command-line,
Put this in a batch file named: getmns.bat (get mail name server):
For example:
output:
For example to pipe the result again into a file do:
:-D
Quick example:
On Ubuntu, if you are interested, for instance, in Gmail then open the Terminal and type:
You could send yourself an email an look in the email header (In Outlook: Open the mail, View->Options, there is 'Internet headers)
Email tech support at your client's hosting provider and ask for the information.
Hey, this really is a question for Serverfault.
If you are using windows do the following:
nslookup
and hit enterset type=MX
and hit enterIf you are using Linux
dig domain.name MX
and hit enter where domain.name is the domain you are trying to find out the smtp server for.If you do not get any answers back from your dns server, there is a good chance that there isn't any SMTP Servers set up for that domain. If this is the case, do like other's have suggested and call the hosting companies tech support.