duanpendan8067
2010-12-26 15:35
浏览 55
已采纳

pear:使用邮件和mime包

I've been using pear mail package 1.20 to send plan text email.

I have downloaded the main-mime packages 1.8.1 so that i can send html email.

I've included them:

  require_once(BASE_PATH.'/PearMail/Mail-1.2.0/Mail.php');
  require_once(BASE_PATH.'/PearMail/Mail_Mime-1.8.1/mime.php');

When I sent out email, I receive the following error:

Fatal error: Call to undefined method Mail_mimePart::encodeHeader() in E:\xampp\htdocs\bookywood\bookywood\application\ExtLib\PearMail\Mail_Mime-1.8.1\mime.php on line 1322

What am i missing here?

图片转代码服务由CSDN问答提供 功能建议

我一直在使用pear mail package 1.20来发送计划文本电子邮件。 < p>我已经下载了主mime包1.8.1,以便我可以发送html电子邮件。

我已经包含了它们:

 <  code> require_once(BASE_PATH。'/ PearMail / Mail-1.2.0 / Mail.php'); 
 require_once(BASE_PATH。'/ PearMail / Mail_Mime-1.8.1 / mime.php'); 
    
 
 

当我发送电子邮件时,收到以下错误:

致命错误:调用未定义的方法 Mail_mimePart: : E:\ xampp \ htdocs \ bookywood \ bookywood \ application \ ExtLib \ PearMail \ Mail_Mime-1.8.1 \ mime.php 第1322行中的encodeHeader()

我在这里缺少什么?

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • du9698 2010-12-26 17:27
    已采纳

    If you want a very nice plug-in HTML/MIME mailer, then I highly recommend HTML Mime Mail. You can use a simple require/include in your code and it can be put anywhere. It doesn't rely on any other PEAR, PECL, or PHP files. You can use the system PHP mailer, or specify information for an SMTP server. The example files show HTML e-mail with attachments, so you can easily have complex e-mail processed properly.

    For your specific error message, it looks like your downloaded PEAR code is relying on other PEAR modules that can't be found because of the location you've put your module files. Since you're using XAMPP, why not use the PEAR batch file and include all the modules that way? Then you'll know all the requirements are fulfilled and your code will work.

    已采纳该答案
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题