PHP Class – PHPMailer
PHPMailer is a PHP class for PHP that provides a package of functions to send email. The two primary features are sending HTML Email and e-mails with attachments. PHPMailer supports nearly all possiblities to send email: mail(), Sendmail, qmail & direct to SMTP server. You can use any feature of SMTP-based e-mail, multiple recepients via to, CC, BCC, etc. In short: PHPMailer is an efficient way to send e-mail within PHP.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <?php require("class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "smtp.example.com"; // SMTP server $mail->From = "from@example.com"; $mail->AddAddress("myfriend@example.net"); $mail->Subject = "First PHPMailer Message"; $mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer."; $mail->WordWrap = 50; if(!$mail->Send()) { echo 'Message was not sent.'; echo 'Mailer error: ' . $mail->ErrorInfo; } else { echo 'Message has been sent.'; } ?> |
You can find more code samples and the base class to download here: Click Here
PHP Class – Geshi
GeSHi is a Generic Syntax Highlighter for PHP and many other languages. The user inputs the source to be highlighted and a language to highlight it in, and GeSHi returns the source code, highlighted and formatted for the web. It includes features for increasing the speed of highlighting, changing how the source is displayed and decreasing the amount of HTML source outputted for speed over slower connections.
GeSHi features also include:
- The ability to check for keywords in source code in either a case sensitive or non-case sensitive manner (for example, Java will only accept classes with TheCorrectCapitalisation, while in PHP it doesn’t matter)
- The ability to auto-caps/auto-noncaps keywords in the source (particularly for SQL and older BASIC dialects)
- The ability to change the style of almost any aspect of the source on the fly, or even choose whether some parts of the source (for example, strings) are highlighted at all. The use of CSS means that the source can take on many aspects – rather than those provided by deprecated HTML elements such as font, b etc.
- The ability to use CSS classes to massively reduce the amount of outputted code.
- XHTML compliant output.
- Simple adding and removing languages.
- Function to URL conversion so functions can be linked to API documentation
- Line numbering, context highlighting and much, much more!

The PHPClass page can be found here: Click Here
The GeSHI HomePage can be found here