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

    你可能感兴趣的文章
    POJ 1113 Wall(计算几何--凸包的周长)
    查看>>
    poj 1125Stockbroker Grapevine(最短路)
    查看>>
    poj 1151 (未完成) 扫描线 线段树 离散化
    查看>>
    POJ 1151 / HDU 1542 Atlantis 线段树求矩形面积并
    查看>>
    poj 1163 数塔
    查看>>
    POJ 1177 Picture(线段树:扫描线求轮廓周长)
    查看>>
    POJ 1182 食物链(并查集拆点)
    查看>>
    POJ 1185 炮兵阵地 (状态压缩DP)
    查看>>
    POJ 1195 Mobile phones
    查看>>
    POJ 1228 Grandpa's Estate (稳定凸包)
    查看>>
    poj 1236(强连通分量分解模板题)
    查看>>
    poj 1258 Agri-Net
    查看>>
    poj 1286 Necklace of Beads
    查看>>
    POJ 1321 棋盘问题
    查看>>
    poj 1321(回溯)
    查看>>
    Qt读取注册表默认值
    查看>>
    poj 1679 判断MST是不是唯一的 (次小生成树)
    查看>>
    POJ 1703 Find them, Catch them
    查看>>
    POJ 1703 Find them, Catch them 并查集
    查看>>
    POJ 1738 An old Stone Game(石子合并)
    查看>>