How to know the SmtpServer settings for my Office 365 provided Outlook 2016 installation?

1.6k views Asked by At

I'm trying to use the Send-MailMessage commandlet in Powershell. It requires that I tell is my SMTP server settings.

I am running an Outlook 2016 desktop client that is associated with my Office 365 subscription. How do I get to know the Smtp server settings?

I tried File -> Account Settings but that doesn't show me the server url and the port number.

1

There are 1 answers

0
Alex On

If your mail is hosted by Office365, then it will have the same SMTP settings...

Server: smtp.office365.com
Port: 587 or 25
TLS: Enabled

Send-MailMessage -To <email> -Cc <email> -Attachments <path> -SmtpServer "smtp.office365.com" -Credential $mycreds -UseSsl -Port "587"

link