a very basic question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mohit_garg
Forum Newbie
Posts: 3
Joined: Sat Jul 23, 2005 8:47 pm

a very basic question

Post 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!
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post 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
Post Reply