2013/8/29 TP发送邮件 <技巧类>
1.导入类文件mail,并创建对象
import('ORG.Com.Phpmailer');
$mail=new PHPMailer();
2.设置信息
$mail->IsSMTP(); //设置使用SMTP服务器发送
$mail->Host = "smtp.126.com"; //设置126邮箱服务
$mail->SMTPAuth = true; // 设置需要验证
$mail->Username = "kongxiangshuaihe@126.com"; // 发件人使用邮箱
$mail->Password = "538567"; // 设置发件人密码
$mail->From = "heitiane@126.com"; // 发件人邮箱
$mail->FromName = "yi时网"; //发送者名称
$mail->AddAddress('666@qq.com'); // 添加发送地址
$mail->IsHTML(true); //指定支持html格式
$mail->CharSet="UTF-8"; //指定字符集
$mail->Subject = "激活帐号"; //邮件标题
$mail->Body = "帐号已经激活,点击跳转localhost/demo.jpg"; //邮件内容,可以加标签
3.发送邮件,成功返回true 失败false
$mail->Send();

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver Mac version
Visual web development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool