Hi @hcemkucuk,
OJS 3.x uses the PHPMailer library for its SMTP support. OJS 2.x uses its own SMTP code. I can’t comment on specific setup needs for Office365, but you might check out this thread: How use office365 with ojs 2.4.8?
Regards,
Alec Smecher
Public Knowledge Project Team