博客
关于我
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/

    你可能感兴趣的文章
    Pillow lacks the JPEG 2000 plugin
    查看>>
    SpringBoot之ElasticsearchRestTemplate常用示例
    查看>>
    ping 全网段CMD命令
    查看>>
    ping 命令的七种用法,看完瞬间成大神
    查看>>
    Pinia入门(快速上手)
    查看>>
    Pinia:$patch的使用场景
    查看>>
    Pinia:$subscribe()的使用场景
    查看>>
    Pinpoint对Kubernetes关键业务模块进行全链路监控
    查看>>
    Pinterest 大规模缓存集群的架构剖析
    查看>>
    pintos project (2) Project 1 Thread -Mission 1 Code
    查看>>
    PinYin4j库的使用
    查看>>
    PIP
    查看>>
    pip install goose-extractor // SyntaxError: Missing parentheses in call to 'print'
    查看>>
    pip install mysqlclient报错
    查看>>
    pip install 出现报asciii码错误的解决
    查看>>
    pip throws TypeError: parse() got an unexpected keyword argument ‘transport_encoding‘ 在尝试安装新软件包时
    查看>>
    pip 下载慢
    查看>>
    pip 升级报错AttributeError: ‘NoneType’ object has no attribute ‘bytes’
    查看>>
    pip 安装opencv-python卡死
    查看>>
    pip 安装出现异常
    查看>>