KUL KING <
kulki...@gmail.com> wrote:
>So I was right that we have to use SMTP to send email. Whether it is from
>localhost or gmail. Am I right?
SMTP = Simple Mail Transfer Protocol. That's the language you use to
talk to another computer to send mail. Usually, you talk to a server
whose job is to take mail from you and send it on to its destination.
If it can't contact the destination machine the first time it tries,
it will wait a while and try again. It won't give up until a few
iterations of this.
You can bypass that and have your program directly contact the
destination machine. In that case, you have to parse the address to
get the domain name, look up the MX record in the DNS for that domain
(not the normal A record), then establish contact with the remote
machine, etc. Using an SMTP relay server is much simpler.
--
Tim Slattery
Slatt...@bls.gov