Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Do I Use SMTP With This ASP Setup?

Status
Not open for further replies.

hydroron

Technical User
Apr 9, 2002
8
0
0
US
What i'm trying to do is have a website send e-mail automatically with ASP. I know the code works because it worked when my website was being hosted by a hosting company. Now i'm doing the hosting myself on my own servers running Windows 2000 Server. SMTP is installed on the server that hosts the ASP website that will be sending the e-mails. The problem i'm having I think is because my servers are not part of a domain, just a workgroup. My DNS is being hosted by Network Solutions but the problem I'm having is what do I put for a MX record? I've tried mail.mywebsitename.com xxx.xxx.xxx.xxx and smtp.mywebsitename.com xxx.xxx.xxx.xxx but I still can't get any e-mails to send. Where do I put the name in Windows 2000 server that i'm using in my DNS records with Network Solutions? I've also tried Jmail but still nothing. Any advice on what the problem could be or a work-around? I'm trying to stay away from hosting my own DNS but it seems thats the only way to make a server a domain controller and to join other servers to that domain. Thanks for any help. I've been working on this for a few days and for something that should be simple is really kicking me in the you know where.
 
Whether your server is in a Microsoft workgroup or Microsoft domain makes no difference in the world on whether it can send email.


Whether an MX record exists for a domain makes no difference in the world whethere a machine can send email -- an MX record specifies only where an internet domain receives email.


Before you distract yourself with testing all the wrong things, create yourself an account at some free internet email hosting company. Reconfigure your app so that it sends email to that account. Run your app.

If the email arrives, then your app works correctly. If it does not, I recommend you first test the correct functioning of your DNS settings on your web server. Here's the questions you should be able to answer, in order:
[ol][li]Get the IP address of the DNS server your web server asks for domain resulution.[/li][li]Using nslookup from your web server to the IP address of the DNS server you got in the previous step, can you retrieve the MX record of the mail server at the free hosting company?[/li][li]Using nslookup or ping from your web server, can your web server get the IP address of the server reported as the MX record of the domain of the free hosting company?[/li][li]Using telnet from the web server, can you make a connection to the IP address of the hosting company's mail server's IP address on port 25?[/li][/ol]

If you can do all of these things, and you app still isn't sending email, it's not a DNS issue, but rather a problem with your mail server or a programming problem in your app.


If and only if all of the above gets worked out and you want to send email from your app to an address in your own domain, there are three steps to get working email receiving at your domain:
[ol][li]Figure out what the servers of authority for your domain is/are. Whois is good for this. If whois is not working, perform a NS-type query in nslookup to "a.root-servers.net" or "a.gtld-servers.net".[/li][li]On the server(s) what was/were the answer to the previous question, creatre an MX record for [any arbitrary server name].yourdomain.com with an arbitrary priority. This can be mail.yourdomain.com, smtp.yourdomain.com, foo.yourdomain.com, bar.yourdomain.com, or sdfasdlkfjasdlkfjasd.yourdomain.com. It doesn't matter what you pick -- the fact that the MX record exists and points to that server makes email receiving work.[/li][li]On the server(s) that was/were the answer to question 1, set up an A record to resolved the address of your MX server. If in set2 you set up "sdfasdlkfjasdlkfjasd.yourdomain.com" as the MX record for your domain, then you must have an A record and an IP address for "sdfasdlkfjasdlkfjasd.yourdomain.com".[/li][/ol] ______________________________________________________________________
TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top