I'm using Delphi 11 for developing windows application and I'm using SMTP for sending mail and from last week I'm getting the error - "Username and Password not accepted". But, earlier the same code was working fine. Please provide some solution to fix this issue.
with IdSMTP1 Do
begin
IOHandler := IdSSLIOHandlerSocketOpenSSL1;
UseTLS := utUseImplicitTLS;
Host := SMTP;
Username := FromUser;
Password := FromPassword;
Port := StrToIntDef(PortNumber, 0);
IdMessage1.From.Address := IdSMTP1.Username; // sender
IdMessage1.From.Name := 'Subject';
try
Connect;
try
Send(IdMessage1);
Result := True;
finally
Disconnect;
end;
except
on E:Exception do
begin
end;
end;
end;