PHP
  Home arrow PHP arrow Composing Messages in HTML for MIME Email with PHP
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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

Composing Messages in HTML for MIME Email with PHP
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 6
    2008-07-30


    Table of Contents:
  • Composing Messages in HTML for MIME Email with PHP
  • Review: sending MIME-compliant messages in plain text format
  • Sending email messages in HTML format
  • Sending email in HTML format using the MIME mailer class

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    Composing Messages in HTML for MIME Email with PHP
    ( Page 1 of 4 )

    Welcome to the fourth episode of the series, "Sending MIME email with PHP." In this article, I’m going to show you how to provide the MIME mailer class with the ability to send email messages in HTML format. This will greatly extend its functionality, so don't miss this tutorial.

    The Multipurpose Internet Mail Extension (short for MIME) permits, among other things, sending email messages in HTML format, working with different types of attached files, and so forth. But, the good news here is that you can use all the features offered by MIME directly with PHP. You can develop applications that dispatch MIME-compliant messages to a bunch of recipients.

    Naturally, sending MIME email with PHP can be done using either a procedural or an object-oriented approach. If you’re interested in utilizing this latter, you’ll find a friendly guide on building a highly modular MIME mailer class in this series of articles. It utilizes this extension in order to send messages in both plain text and HTML format. It also supports working with file attachments.

    At this point, I should assume that you’re well aware of the goals of this series. Thus, it’s an excellent time to rehash the topics covered in the last tutorial, in case you haven't had the chance to read it yet. In that particular article, I demonstrated how to improve the signature of the MIME mailer class that I built in the beginning of this series by adding a brand new property, called “$mimeTypes,” to it. This helped store all the MIME types supported by the class, when dealing with file attachments.

    Of course, after introducing this minor modification to the signature of the aforementioned mailer class, its whole structure looked more compact and more efficient. Nonetheless, my primary intention here is to teach you how to create an expansible PHP class that takes real advantage of the MIME extension.

    With the preliminaries out of our way, let’s jump forward and see how to add HTML capabilities to this MIME mailer class. It’s going to be an instructive experience!



     
     
    >>> More PHP Articles          >>> More By Alejandro Gervasio
     

       

    PHP ARTICLES

    - Using Directory Iterators to Build Loader Ap...
    - Using the spl_autoload() Functions to Build ...
    - Working Out of the Object Context to Build L...
    - Using the _autoload() Magic Function to Buil...
    - The Destruct Magic Function in PHP 5
    - The Autoload Magic Function in PHP 5
    - Developing a Recursive Loading Class for Loa...
    - The Sleep and Wakeup Magic Functions in PHP 5
    - Using the Clone Magic Function in PHP 5
    - Including Files Recursively with Loader Appl...
    - The Call Magic Function in PHP 5
    - Designing a Captcha System with PHP and MySQL
    - Using Static Methods to Build Loader Apps in...
    - The Isset and Unset Magic Functions in PHP 5
    - Advanced PHP Form Input Validation to Check ...





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