Sending mail through PHP is very simple. PHP has a function called mail() which can be invoked to send an outbound mail through SMTP. The mail() function is limited to sending mails through the machine it is called from - it cannot be used to send mails using a remote SMTP server.
Basic requirements of the mail function are the recipient's address, message subject and message data. Returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise. Below is an example on howto send a mail with complete headers:
Further information can be found at :
http://us2.php.net/manual/en/function.mail.php
There is an advanced tutorial for this at:
http://www.phpfreaks.com/tutorials/130/0.php
- 205 Users Found This Useful