Page 1 of 1
a very basic question
Posted: Sat Jul 23, 2005 9:40 pm
by mohit_garg
i m a newbie here, i just wanna know the complete process of sending and recieving mails thru PHP, i went thru mail function, i wanna know how PHP works with SMTP servers and how does the whole process goes on. i dont know the requirements of this function!
Posted: Sun Jul 24, 2005 8:22 am
by Ambush Commander
Uh, what, are you trying to reimplement the mail() via sockets?
If you want to learn about the standard, which has nothing to do with PHP, go here:
http://en.wikipedia.org/wiki/Simple_Mai ... r_Protocol
If you want to know how to use the function, reread the documentation:
http://us2.php.net/manual/en/function.mail.php In the comments section, there's lots of examples and gotcha's that people have found. Always read the comments section.
If you want to learn how to recieve emails, you'll find out that this means that your machine will always have to be on, and you'll need something that recieves incoming SMTP connections. It's a much better practice to use an external mailserver that has always on servers, and then use POP3 or the like to access the mail. Check out:
http://us2.php.net/manual/en/ref.imap.php