Search code examples
phpphp-5.3php-5.2

mime_mail class not found


My following code is unable to send message text. It is able to send MIME attachments. However, I am unable to send any text messages through this code. I suspect that issue is somewhere with the $message-variable.

// MIME EMAIL CODE - ALLOWS ATTACHEMENTS 
// SIMPLE SEND EMAIL PG.448 PHP REFERENCE PLUS ATTACHMENT EXAMPLE FROM SAME PAGE
// include "mime_mail.inc"; //THIS CAUSED A WARNING AND, APPARENTLY, IS NOT REQUIRED. CODE OK W/O IT

//CREATE OBJECT INSTANCE
$mail = new mime_mail ;

//GLOBAL VARIABLES
global $data, $fileX, $content_type ;

//SET ALL DATA SLOTS
$mail->from = "[email protected]" ;
$mail->to = "[email protected]" ;
$mail->subject = "Weekly Comic Strip - Week of 6/20/201" ;
$mail->body = "Hope you enjoy your today...

  http://www.softhec.com/TCStripComposition-27Cb.jpg

" ;

Solution

  • Try replacing this:

    // include "mime_mail.inc"; //THIS CAUSED A WARNING AND, APPARENTLY, IS NOT REQUIRED. CODE OK W/O IT
    

    with this:

    include "mime_mail.inc"; //THIS CAUSED A WARNING AND, APPARENTLY, IS NOT REQUIRED. CODE OK W/O IT