phpMailer发送邮件

来源:互联网 发布:mac虚拟机安装linux 编辑:程序博客网 时间:2024/06/08 14:36
<?php
header('content-type:text/html;charset=utf-8');

//定义地址
$url="http://www.aaa.com/email.php";

//读取内容
$file=file_get_contents($url);

//引入文件
include_once('./PHPMailer/Mail.class.php');

//定义
$title="天气预报";
$content=$file;
$user='××客服';
$address="1358627079@qq.com";

//调动方法
if(Mail::send($title,$content,$user,$address)){
    echo "发送成功";
}else{
    echo Mali::$error;
};
?>
0 0
原创粉丝点击