找不到mime_mail类

时间:2011-06-30 08:24:08

标签: php php-5.3 php-5.2

我的以下代码无法发送消息文本。它能够发送MIME附件。但是,我无法通过此代码发送任何短信。我怀疑问题出现在$message - 变量的某个地方。

// 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 = "me@admin.com" ;
$mail->to = "ragsr@admin.com" ;
$mail->subject = "Weekly Comic Strip - Week of 6/20/201" ;
$mail->body = "Hope you enjoy your today...

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

" ;

1 个答案:

答案 0 :(得分:0)

尝试替换它:

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

用这个:

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