That's great. I didn't know about how SMTP works. Thanks for your demonstration :)
On Mon, Sep 24, 2012 at 9:24 PM, Tim Slattery <[email protected]> wrote: > KUL KING <[email protected]> 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 > [email protected] > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

