代码
<?php include ('class-phpmailer.php'); include ('class-smtp.php'); $mail=new PHPMailer(); // 设置PHPMailer使用SMTP服务器发送Email $mail->IsSMTP(); // 设置邮件的字符编码,若不指定,则为'UTF-8' $mail->CharSet='GB2312'; // 添加收件人地址,可以多次使用来添加多个收件人 $mail->AddAddress('xxxx@gmail.com'); // 设置邮件正文 $message='用WordPress的代码发送的Email'; $mail->Body=$message; // 设置邮件头的From字段。 // 对于网易的SMTP服务,这部分必须和你的实际账号相同,否则会验证出错。 $mail->From='xxxxxx@163.com'; // 设置发件人名字 $mail->FromName='Wang Jinbo'; // 设置邮件标题 $mail->Subject='Test Mail'; // 设置SMTP服务器。这里使用网易的SMTP服务器。 $mail->Host='smtp.163.com'; // 设置为“需要验证” $mail->SMTPAuth=true; // 设置用户名和密码,即网易邮件的用户名和密码。 $mail->Username='xxxxxx'; $mail->Password='xxxxxx'; // 发送邮件。 $mail->Send(); ?>
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
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
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
How Long Does It Take To Beat Split Fiction?
4 weeks agoByDDD
R.E.P.O. Save File Location: Where Is It & How to Protect It?
4 weeks agoByDDD

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

SublimeText3 English version
Recommended: Win version, supports code prompts!
