php - Setting up PHPMailer with Office365 SMTP -


I am trying to set up PHPMailer so that one of our clients can automatically generate email from their account. I have logged into their Office 365 account, and found that the settings for PHPMailer are as follows:

  Host: smtp.office365.com Port: 587 Certification: tls   

I have applied these settings to PHPMailer, although no email is sent (the function I call works fine for our mail, which is sent from the external server ( Not a server serving web pages).

  "Host" => "Smtp.office365.co "" Clientemail@office365.com "," T "," user name "=" gtc: mediafile = "", "port" => 587, "athe" = & gt; true, "safe" = & gt; Password "= & gt;" Clientpass "," to "= & gt;" Myemail "," from "=>" Clientemail@office365.com "," Sannam "=>" Client Name "," Topic => $ Body, "altbody" => $ body, "message" =>, "debug" =>  $ theme, "body" => / Pre> 

Does anybody know what settings are required to send via PHP to smmtp.office365.com?

Try it, it works fine for me, I So I've been using for a long time

  $ mail = new PHPMailer (true); $ Mail- & gt; Host = "smtp.office365.com"; $ Mail- & gt; Port = 587; $ Mail- & gt; SMTPSecure = ''; $ Mail- & gt; SMTPAuth = true; $ Mail- & gt; Username = "email"; $ Mail- & gt; Password = "password"; $ Mail- & gt; Setfrum ('email', 'name'); $ Mail- & gt; Add replayito ('email', 'name'); $ Mail- & gt; SMTPDebug = 2; $ Mail & gt; IsHTML (true); $ Mail & gt; MsgHTML ($ message); $ Mail & gt; Send ();    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -