You fixed your first issue only to reveal a second issue.

Whatever account you are authenticating against doesn't have permission to send from the users email address.

You'll need to get the permissions changed in the office365 portal