【发布时间】:2022-01-24 10:46:08
【问题描述】:
我是新来的。我最近遇到了来自我的 Windows 服务器的电子邮件发送问题。 50% 的情况下邮件无法发送用户。 下面显示错误消息
*******Password not accepted from server: 421 4.7.66 TLS 1.0 and 1.1 are not supported. Please upgrade/update your client to support TLS 1.2. Visit https://aka.ms/smtp_auth_tls. [SI2P153CA0009.APCP153.PROD.OUTLOOK.COM]*******
This is my Mail Server Configuration code :
<?php
//require_once('class.phpmailer.php');
//date_default_timezone_set('PRC'); //Set China time zone
date_default_timezone_set('Asia/Dhaka');
$mail = new PHPMailer(); //Instantiate
$mail->SetLanguage("en", 'language.php');
$mail->SMTPDebug = 4;
$mail->SetLanguage("en");
$mail->IsSMTP(); // Enable SMTP
$mail->SMTPAuth = true; //Enable SMTP authentications
$mail->SMTPSecure = 'tls';
$mail->Host = "Smtp.office365.com"; //SMTP server Take 163 mailbox as an example
$mail->Port = 587; //Mail sending port
$mail->Username = "UserName"; //your mailbox
$mail->Password = "Password"; //Your password
?>
我已安装 Visual Studio 2022 用于升级 .NET 框架。 你能告诉我如何解决问题吗?
【问题讨论】:
标签: visual-studio smtp office365 phpmailer .net-framework-4.8