
June 17th, 2010, 04:49 PM
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 1
Time spent in forums: 3 m 12 sec
Reputation Power: 0
|
|
|
Some conceptual questions about how mail works
I have some conceptual questions about how mail works. I'm a web programmer w/ limited sysadmin experience. I've always taken for granted that the server I'm programming on is able to send out email. Typically, I use PHP's mail() function and it just works. Now I'm working on a server (Windows Server) that is not running an SMTP server, so I need to figure out how to send out mail.
Let's say my server is foo.bar.org and I work for bar.org, which has many servers. I want the webserver on foo to be able to send out email. I think that one way to do this is to get an email address from bar.org (which has an SMTP server running), and set up the webserver on foo to connect to that SMTP server to send out email. Will that work?
I think that another way to make this work is to run an SMTP server on foo, and have the webserver connect to it (i.e., on localhost). But then how does the SMTP server know which machine to connect to, to send and receive emails? Does it connect directly to the SMTP server named in the email's "To:" field? In other words, if the email is address to "bill@microsoft.com", will my SMTP server connect directly to port 25 on microsoft.com?
Thanks.
|