您的当前位置:首页正文

php邮件发送乱码怎么办

2020-11-02 来源:独旅网

php发送邮箱乱码 :(缺少加红部分)

$mail = new PHPMailer();

$mail->IsSMTP();

$mail->SMTPAuth = true;

$mail->Host = $smtp;

$mail->Username = $youremail;

$mail->Password = $password; //必填, 以上邮箱对应的密码

$mail->From = $youremail;

$mail->FromName = $site_name; //发件人称呼

$mail->AddAddress($ymail,$yname);

$mail->CharSet = "utf-8";

更多相关知识,请访问PHP中文网!

显示全文