i've read some threads here in SO that someone managed to use gmail's smtp server to send out messages from php script.
so if php sends a mail to email@example.com it looks like this:
- php tells sendmail (smtp server) to send the message
- sendmail sends the message to gmail's smtp server
- gmail's smtp server sends the message to hotmail's smtp server
so now i wonder, why should one use gmail's smtp server to send a mail? isn't it better just to send the message from sendmail to hotmail's smtp server?
- php tells sends to local sendmail
- sendmail sends to hotmail's smtp server
- php sends the message to gmail's smtp server
- gmail's smtp server sends to hotmail's smtp server.
- php sends the message to hotmail's smtp server. (why does this not work? why have a intermediate smtp server (that actually acts like a pure client) to send to another smtp server?
correct me if im wrong, but isnt all that requires for a mail to be sent a communication between TWO smtp servers, the senders and the receivers (in this case, hotmail)?
i cant still see the picture here and what is happening/required to send a mail. i know what a MTA and a MDA is. but noone has explained this clearly so one could get the idea of how it all works.
would be great if someone could shed a light on this confusing area!