Email Output plugin in logstash

Hi Team,

I'm getting this error, in Email output plugin in logstash,

[2020-03-17T01:31:33,099][ ERROR ][logstash.outputs.email ][main] Something happen while delivering an email {:exception=>#<Net::SMTPAuthenticationError: 504 5.7.4 Unrecognized authentication type [SG2PR06CA0218.apcprd06.prod.outlook.com]

and I'm using this configuration attached below.

input

{

file

                {

                                path => "/etc/logstash/logstash1.csv"

                                start_position => "beginning"

                                sincedb_path => "/dev/null"

                }

}

filter

{

                csv

                {

                                separator => ","
                                skip_empty_columns => "true"
                                columns => ["Date","type","Particulars","VchType","VchNo","Debit","Credit"]
                }

                mutate {
     convert => ["Date", "string"]
     convert => ["type", "string"]
     convert => ["Particulars", "string"]
     convert => ["VchType", "string"]
     convert => ["VchNo", "string"]
     convert => ["Debit", "float"]
     convert => ["Credit", "float"]
 }



}

output

{
  file {
        path => "/var/log/logstash/email_test_new.txt"
       }
	email {
		
		to => 'atulya.sharma@*****.com'
		codec => "plain"
		debug => 'true'
		#via => 'smtp'
		address => 'smtp.office365.com'
		username => 'sagar.mandal@****.com'
		password => '**************'
		subject => 'test'
		body => 'test'
		port => 587
		use_tls => true
		authentication => 'plain'
		
       	}

stdout {}
	                
}

My configuration is making the file in the desired but the email is not working, Really need help on this guys.

Thanks and Regards,
Sagar Mandal