PHP
  Home arrow PHP arrow Page 4 - Email Management Details
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

Email Management Details
By: Sams Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 6
    2006-11-16

    Table of Contents:
  • Email Management Details
  • Attaching a File to a Message
  • Attached Images for HTML Emails
  • A Word About Email Delivery
  • Exam Prep Questions

  • 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


    Email Management Details - A Word About Email Delivery


    (Page 4 of 5 )

    mail() returns TRUE if the email is accepted for delivery. This does not guarantee that the email will be delivered.

    Internet email is an unguaranteed delivery system.

    Email messages can be lost at any point between your MTA and your user's MUA. This is often caused by a catastrophic disk failure on an MTA, combined with inadequate backups. When email messages are lost, there is no automatic mechanism to trigger re-sending the email message. Lost email messages are never delivered to the intended recipient.

    A more common problem is email messages that get rejected by the user's MTA. Causes include

    • Inbox over quota

    • Email too large to accept

    • Disabled user account

    • Misspelled email address name

    • Virus scanner detected a virus in an attachment

    When an MTA rejects an email message, it normally sends back the email message with a description of why the email was rejected. These 'bounced' email messages are never delivered to the intended recipient.

    If the email message is successfully delivered to the intended recipient, this can still cause problems. The user might use a filter that bounces email from senders not in a whitelist. The user might have set up a vacation auto-responder, which automatically sends back a message saying that the user is currently out of the office.

    It's therefore essential that your PHP application can cope with these situations:

    • Every single email you send should have a valid Reply-To: header, to allow receipt of bounced email messages. You should set up a mailbox just for bounces to emails sent from your PHP scripts. It's a good idea to have someone go through the mailbox once a day, just in case there is anything you can do about the bounced email.

    • Normally, there should be a way for the user of your PHP script to make your script send the email again.

    • Any order confirmations, receipts, and invoices that you send via email should also be available through some other means—either via your website, or via snail mail. Apart from being good customer service, many of these documents are legally important.

    Further Reading

    The standards for email handling are defined by the RFC series of documents, which you can find at http://www.rfc-editor.org/.

    • RFC's 821 and 822 are the current standards on SMTP and plain-text emails, respectively.

    • RFC's 2045, 2046, 2047, 2048, and 2049 define the MIME standard.

    • RFC 1896 discusses the "text/enriched" MIME content type. This is very similar—but not the same as—HTML email.

    • RFC 2557 defines the use of Content-IDs to use attached images in HTML emails.

    • RFC 2554 defines the use of SASL for authenticating connections to an MTA.

    • Internet Mail Consortium home page http://www.imc.org/. In particular, http://www.imc.org/terms.html is an excellent reference.

    More PHP Articles
    More By Sams Publishing


       · This article is an excerpt from the book "Zend PHP Certification Study Guide,"...
     

    Buy this book now. This article is excerpted from chapter 8 of the Zend PHP Certification Study Guide, written by Zend Technologies (Sams; ISBN: 0672327090). Check it out today at your favorite bookstore. Buy this book now.

       

    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 5 hosted by Hostway
    Stay green...Green IT