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.

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

报告相同问题?

悬赏问题

  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败