相关疑难解决方法(0)

我应该如何从PHPMailer 5.2升级到6.0?

我有一个脚本,目前使用最新版本的PHPMailer 5.2.x. PHPMailer 6.0已经发布,但表示它会破坏向后兼容性 - 升级需要做些什么?

<?php
require 'PHPMailerAutoload.php';

$mail = new PHPMailer;

//$mail->SMTPDebug = 3;                               // Enable verbose debug output

$mail->isSMTP();                                      // Set mailer to use SMTP
$mail->Host = 'smtp1.example.com;smtp2.example.com';  // Specify main and backup SMTP servers
$mail->SMTPAuth = true;                               // Enable SMTP authentication
$mail->Username = 'user@example.com';                 // SMTP username
$mail->Password = 'secret';                           // SMTP password
$mail->SMTPSecure = 'tls';                            // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587;                                    // TCP port to connect to

$mail->setFrom('from@example.com', 'Mailer');
$mail->addAddress('joe@example.net', 'Joe …
Run Code Online (Sandbox Code Playgroud)

php email phpmailer

5
推荐指数
1
解决办法
5672
查看次数

标签 统计

email ×1

php ×1

phpmailer ×1