tags:

views:

275

answers:

4

Hi everybody. 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?

+1  A: 

You could send yourself an email an look in the email header (In Outlook: Open the mail, View->Options, there is 'Internet headers)

cimnine
Well i did that. i sent myself an email (to gmail account). And i read its header . But there is so much info out there. nothing like smtp.domainname.com or mail.domainname.com
Krishna Kant Sharma
A: 

Email tech support at your client's hosting provider and ask for the information.

bcat
A: 

Hey, this really is a question for Serverfault.

If you are using windows do the following:

  1. Open up a command prompt (CMD.exe)
  2. Type nslookup and hit enter
  3. Type set type=MX and hit enter
  4. Type the domain name and hit enter, for example: google.com
  5. The results will be a list of host names that are set up for SMTP

If you are using Linux

  1. Open a command prompt
  2. Type 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.

Jordan S. Jones
Thank you. Jordan.
Krishna Kant Sharma
+1  A: 

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:

$ host google.com
google.com has address 74.125.127.100
google.com has address 74.125.67.100
google.com has address 74.125.45.100
google.com mail is handled by 10 google.com.s9a2.psmtp.com.
google.com mail is handled by 10 smtp2.google.com.
google.com mail is handled by 10 google.com.s9a1.psmtp.com.
google.com mail is handled by 100 google.com.s9b2.psmtp.com.
google.com mail is handled by 10 smtp1.google.com.
google.com mail is handled by 100 google.com.s9b1.psmtp.com.

(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.

tux21b
+1, thanks. that was helpful
Krishna Kant Sharma