Sending Email using Arduino Uno Wifi Rev2 (SMTP)

I use this code to send an email but It seems does not work. The Arduino MCU is able to connect to SMTP server, and it actually print ‘DONE’ after running the whole series of the code for sending email, but I did not receive any email (Receiver email address) or send an email (Sender email address).

Could you give any suggestion to my code or ways to solve this problem? Thank you XD

#include <SPI.h>
#include <WiFiNINA.h>
#include <HX711_ADC.h>
#include "arduino_secrets.h"

HX711_ADC LoadCell(4,5);  //HX711 constructor (dout pin, sck pin):

char ssid[] = SECRET_SSID;
char pass[] = SECRET_PASS;
int status = WL_IDLE_STATUS;
WiFiClient wifi; 



//Write here you server and account data
#define HOST  "smtp.office365.com"      // SMTP server
#define PORT 587             // SMTP server port



//Write here your information about sender and directions 
const char EMAIL_FROM[ ] = "example@arduino.com";    // Sender address
const char EMAIL_PASSWORD[ ] = "examplepassword";
const char EMAIL_TO[ ] = "anotherexample@arduino.com";        // Recipient address



#define EMAIL_FROM_BASE64 "examplebase64email"
#define EMAIL_PASSWORD_BASE64 "examplebase64password"

//Write here the subject of the email
char SUBJECT[ ] = "LETTER RECEIVED ALERT";
char EMAIL_CONTENT[ ] = "Your mailbox have something.";



void setup() {
  Serial.begin(9600);
  LoadCell.begin();
  LoadCell.start(2000);
  LoadCell.setCalFactor(999.0);


  while ( status != WL_CONNECTED) {
    status = WiFi.begin(ssid, pass);
  }

  Serial.println("WiFi connected");

  wifi.connect(HOST,PORT);
  if(wifi.connect(HOST,PORT)) {
    Serial.println("access to server");
  }
   else {
    Serial.println("error");
    
  }

}

void loop() {
  LoadCell.update();
  float i = LoadCell.getData();
  Serial.println(i);
  delay(100);
  if (i >50){
    sendemail();
    delay(10000);
  }
  
}


void sendemail() {
    if (wifi.connect(HOST,PORT)) {

      Serial.println ( " access to server " );
       
      wifi.println("HELO outlook.office.com");
      wifi.println(F("250"));
      
      wifi.println("AUTH LOGIN");
      wifi.println(F("334 VXNlcm5hbWU6"));
      
     
      wifi.println (EMAIL_FROM_BASE64);
      wifi.println(F("334 UGFzc3dvcmQ6"));
      
    
      wifi.println ( EMAIL_PASSWORD_BASE64 );
      wifi.println ( F ("235"));
      
       
      char mailfrom [50] = "MAIL FROM:<";
      strcat ( mailfrom , EMAIL_FROM );
      strcat ( mailfrom , ">" );     
    
      wifi.println ( mailfrom );
      wifi.println (F ("250"));
     
      char mailto [50] = "RCPT TO:<";
      strcat ( mailto , EMAIL_TO );
      strcat ( mailto , ">" );
    
      wifi.println ( mailto );
      wifi.println ( F ("250"));
       
      wifi.println ( "DATA" );
      wifi.println ( F ("354"));
    
      char efrom [100] = "FROM: ";
      strcat ( efrom , EMAIL_FROM );
      strcat ( efrom , " " );
      strcat ( efrom , "<" );
      strcat ( efrom , EMAIL_FROM );
      strcat ( efrom , ">" );
      wifi.println ( efrom );

    
     
    
      char eto [100] = "TO: ";
      strcat ( eto , EMAIL_TO );
      strcat ( eto , " " );
      strcat ( eto , "<" );
      strcat ( eto , EMAIL_TO );
      strcat ( eto , ">" );
      wifi.println ( eto );
    
    
    
      char subject [50] = "SUBJECT: ";
      strcat ( subject , SUBJECT );
      wifi.println ( subject );
  
      wifi.println ( "\r\n" );

      wifi.println (EMAIL_CONTENT);
 
    
      wifi.println ( "\r\n." );
 
     
      wifi.println ( "QUIT" );
      Serial.println("DONE");
      
       
  }else{

    Serial.println ( " couldn't access to server " );
  }

 
}