Home  >  Article  >  php教程  >  thinkphp 邮件发送

thinkphp 邮件发送

WBOY
WBOYOriginal
2016-06-13 09:39:57955browse

1.下载PHPMailer类包

下载地址

https://code.google.com/a/apache-extras.org/p/phpmailer

注意把文件放在: ThinkPHP/Extend/Vendor/PHPMailer/class.phpmailer.php

2.

 SendMail(,,'PHPMailer.class#PHPMailer'=
    ->
    ->CharSet='UTF-8'
    ->AddAddress(
    ->Body=
    ->From=C('MAIL_ADDRESS'
    ->FromName='LilyRecruit'
    ->Subject=
    ->Host=C('MAIL_SMTP'
    ->SMTPAuth=
    ->Username=C('MAIL_LOGINNAME'->Password=C('MAIL_PASSWORD'
    (->

3. 发送  $this->SendMail("zg@126.cn","title","bodyinfo ");

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:PHP学习笔记(4)Next article:php过滤敏感词的示例