Php 我想将我的office 365邮件与ci连接,但此邮件无法连接

Php 我想将我的office 365邮件与ci连接,但此邮件无法连接,php,codeigniter,email,office365,Php,Codeigniter,Email,Office365,我想将我的office 365邮件与ci连接,但此连接不可用我使用godaddy提供的名称廉价服务器office 365 require('/home/shoodkoi/public_html/emailcampaign/phpmailer/class.phpmailer.php'); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPDebug = 1; $mail->SMTPAuth = TRUE; $mail->

我想将我的office 365邮件与ci连接,但此连接不可用我使用godaddy提供的名称廉价服务器office 365

require('/home/shoodkoi/public_html/emailcampaign/phpmailer/class.phpmailer.php');
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPDebug = 1;
$mail->SMTPAuth = TRUE;
$mail->SMTPSecure = "tls";
$mail->Port= 587;
$mail->Username='';
$mail->Password= '';
$mail->Host= "smtp.office365.com";
$mail->Mailer = "smtp";
$mail->SetFrom('no-reply@gbosss.co.in', 'Gbosss');```


缺少用户名和密码

$mail->Username='';
$mail->Password= '';
还要注意,发件人地址必须与smtp_用户相同