1) Open Mac Mail, (in the top left corner)select Mail>Preferences>Accounts>Add Other Mail Account>Continue
2) Enter your name and SUNet ID(or alias)@stanford.edu. IMPORTANT: do not enter your password, instead add a space. Click Create, then Next.
3) Enter outlook.office365.com in the Mail Server field and your SUNet ID password in the password field. Click Next.
4) Enter smtp.stanford.edu in the SMTP Server field, your SUNet ID(or alias)@stanford.edu and password.. Click Create.
5) Now go into the Outgoing Mail Server dropdown and select Edit SMTP Server List.
6) Locate the smtp.stanford.edu Server Name profile that was just created, select the Advanced tab and ensure port 465 is entered and username and password fields are populated similar to the screenshot below.