search
Homephp教程php手册PHP邮件发送(已测试成功)


/** 用PHPMailer类来发信   步骤: 0: 引入 1: 实例化 2: 配置属性 3: 调用发送   **/   require('./PHPMailer/class.phpmailer.php');   $phpmailer = new PHPMailer();     /* 设置phpmailer发信用的方式 可用用win下mail()函数来发 可以用linux下sendmail,qmail组件来发 可以利用smtp协议登陆到某个账户上,来发 */   $phpmailer->IsSMTP();  // 用smtp协议来发   $phpmailer->Host = 'smtp.163.com'; $phpmailer->SMTPAuth = true; $phpmailer->Username = '';  //发送邮箱的账号(用163邮箱发信的账号) $phpmailer->Password = '';  //发送邮箱的密码   // 可以发信了 $phpmailer->CharSet='utf-8'; $phpmailer->From = 'never_kill@163.com'; $phpmailer->FromName = 'neverkill'; $phpmailer->Subject = 'Superstart Aseoe'; $phpmailer->Body = '爱思资源网(http://www.aseoe.com/)- 专注前端开发与PHP编程设计.';   //设置收信人 $phpmailer->AddAddress('never_kill@163.com','neverkill'); // 添加一个抄送 $phpmailer->AddCC('597417106@qq.com','Aseoe');   // 发信   echo $phpmailer->send()?'ok':'fail';

PHP邮件发送实例下载

PHP查看邮件是否已被阅读



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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment