博客
关于我
thinkphp3.2发送邮件并发送附件
阅读量:241 次
发布时间:2019-03-01

本文共 1275 字,大约阅读时间需要 4 分钟。

ThinkPHP3.2??Com???PHPMailer????

?ThinkPHP3.2???????????PHPMailer?????????????????????Com????PHPMailer?????????

1.??Com????

?????PHP????????Com??????????phpinfo?????????com_dotnet??????????Com????????????????????????

  • ??php.ini???
  • ??extension=php_com_dotnet.dll?
  • ??com_allow_dcom??????????true???????????
  • 2.??config.php??

    ?ThinkPHP???config.php?????Application/Home/Conf??????????????????????

    $config = new \Think\Config('config.php');

    ????????config.php??????????

    3.??PHPMailer??

    ??PHPMailer?????????Application/Home/Common?????????

    • ?????????????com.allow_dcom????????????
    • ??PHP???PHPMailer?????

    4.??PHPMailer???

    ?PHPMailer??????ThinkPHP/Library/Vendor???????????

    • ??????????
    • ?class.smtp.php????????PHPMailer??????????

    5.??PHPMailerSMTP?

    ?class.smtp.php??????SMTP.php?????ThinkPHP/Library/Vendor????

    6.??PHP????

    ??PHP??????wamp????php.ini?????????

  • ??extension=php_openssl.dll???????????
  • ??allow_url_fopen??????On?
  • ???????Apache???
  • 7.??think_send_mail??

    ????????think_send_mail??????????????????

    think_send_mail('?????', '?????', '????', '????');

    8.??????

    ????????????????????????????

    think_send_mail('?????', '?????', '????', '????', [    '??1.txt' => '??1.txt',    '??2.zip' => '??2.zip']);

    ??????????????????

    ????????????ThinkPHP3.2????PHPMailer?????????????????????????????

    转载地址:http://pxet.baihongyu.com/

    你可能感兴趣的文章
    NoSQL&MongoDB
    查看>>
    NotImplementedError: Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty()
    查看>>
    npm install digital envelope routines::unsupported解决方法
    查看>>
    npm install报错,证书验证失败unable to get local issuer certificate
    查看>>
    npm install无法生成node_modules的解决方法
    查看>>
    npm run build 失败Compiler server unexpectedly exited with code: null and signal: SIGBUS
    查看>>
    npm run build报Cannot find module错误的解决方法
    查看>>
    npm run build部署到云服务器中的Nginx(图文配置)
    查看>>
    npm run dev 报错PS ‘vite‘ 不是内部或外部命令,也不是可运行的程序或批处理文件。
    查看>>
    npm start运行了什么
    查看>>
    npm WARN deprecated core-js@2.6.12 core-js@<3.3 is no longer maintained and not recommended for usa
    查看>>
    npm入门,这篇就够了
    查看>>
    npm切换到淘宝源
    查看>>
    npm前端包管理工具简介---npm工作笔记001
    查看>>
    npm和yarn清理缓存命令
    查看>>
    npm和yarn的使用对比
    查看>>
    npm学习(十一)之package-lock.json
    查看>>
    npm报错unable to access ‘https://github.com/sohee-lee7/Squire.git/‘
    查看>>
    npm的常用配置项---npm工作笔记004
    查看>>
    npm的问题:config global `--global`, `--local` are deprecated. Use `--location=global` instead 的解决办法
    查看>>