Originally posted by kwame Iwegbue:
so i guess from a regular desktop/private computer, that would be "localhost".
Probably not.
Here's how e-mail works. You give your e-mail message to a mail server and tell it who the recipients are. It finds their mail server, if it can, and between the two servers your message gets transferred from your server to the recipients' server.
Now here's the problem with that idea. All of those e-mail servers are accessible from the Internet. They have to be so that they can find each other and transfer messages. That means that anybody anywhere on the Internet can connect to any e-mail server and ask it to send a message to anybody else. This ability has been abused by people named "spammers" who use other people's servers to send out mass mailings that try to cheat people. So public e-mail servers won't let your program use them to send messages unless you have been pre-approved in some way.
In your case you don't have your own server. And even if you install your own server it probably isn't going to be trusted by other servers, for various technical reasons (I'm not writing an entire magazine article here). If you don't have access to an SMTP server that already exists, then you are wasting your time. If you are writing this program for a company, then that company should have an e-mail server that you can use. As I already said, you need to talk to the administrator of that server to get yourself approved to use it. But if you're just writing it for personal use, you are going to find it a lot more difficult to get access to a server.