Go to Site administration > Server > Email > Outgoing mail configuration

To get the SMTP servers functioning, only four values need to be set:
SMTP hosts: smtp.office365.com:587
SMTP security: TLS
SMTP username: Full email address of your Office365 account
SMTP password: password for the above email account

NOTE: Your SMTP username and no-reply address need to be the same. You can configure the no-reply address under No-reply and domain settings.