PHP
  Home arrow PHP arrow Migrating Class Code for a MIME Email ...
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Migrating Class Code for a MIME Email to PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2008-08-06

    Table of Contents:
  • Migrating Class Code for a MIME Email to PHP 5
  • Sending MIME email with PHP 4
  • Porting the code of the previous MIME mailer class to PHP 5
  • Putting the brand new mailer class to work

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Migrating Class Code for a MIME Email to PHP 5


    (Page 1 of 4 )

    Welcome to the final installment of the series, “Sending MIME email with PHP.” This series teaches you how to build a highly modular PHP class that can be used to send MIME-compliant email messages in plain text and HTML, while letting you work with file attachments as well. In this article, I'm going to migrate the source code from the previous article to PHP 5, taking full advantage of the new and improved features in the latest version of PHP.

    One of the easiest tasks to perform with PHP is sending email to one or more recipients, thanks to its popular built-in “mail()” function. However, if you’re armed with the right background, it’s relatively simple to build an entire mailer class using this function, so that you can take advantage of the MIME extension.

    This mail extension permits, among other things, sending messages in HTML format and handling different types of file attachments, which you’ve surely done hundreds of times before while using your favorite email client. Nonetheless, if you’re interested in learning how to do all of these useful things by utilizing a single PHP class, then start reading this group of articles!

    At this point I'm assuming that you already read the last article of this series, so you’ll surely recall that I completed the development of a MIME mailer class provided with the capacity to sending email messages in HTML and plain text format. It also had the ability to handle a decent number of file attachments. While this mailer class can be used with small PHP applications, it lacks some important features related specifically to its object model, since it was built in PHP 4 from the very beginning.

    So are you ready to learn how to port the full source code of this MIME mailer class to PHP 5? Let’s begin now!

    More PHP Articles
    More By Alejandro Gervasio


       · In this last installment of the series, the code of the MIME mailer class built in...
     

       

    PHP ARTICLES

    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Database Security: Guarding Against SQL Inje...
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Securing Your Web Application Against Attacks
    - Sub Classing Exceptions in PHP 5
    - Authentication for Web Application Security
    - Building a Content Management System with Co...
    - Filters and Login Systems for Web Applicatio...
    - Working with the Email Class in Code Igniter





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT