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?

  • 写回答

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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!