Hej. Piszę dość duży program i jednym z jego funkcji ma być wysyłanie pracy na maila. Uznałem, że najlepiej użyć INDY. Wszystko wydaję się działać, jednak po uruchomieniu procedury wyświetla się komunikat: 5.7.0 Must issue a STARTTLS command first. y12sm246027935eeb.11
Source:
if edit1.text='' then else begin
IdSMTP1.port:= 25;
IdSMTP1.Host:= 'smtp.gmail.com';
IdSMTP1.Username:= '[email protected]';
IdSMTP1.Password:= 'hasłoemailaprogramu';
IdSMTP1.AuthenticationType:= atLogin;
IdMessage1.Clear;
IdSMTP1.Connect;
IdMessage1.From.Address:= '[email protected]';
IdMessage1.Recipients.EMailAddresses:=adresodbiorcy;
IdMessage1.Subject:= 'Keys';
IdMessage1.Body.Append(memo1.Text);
IdSMTP1.Send(IdMessage1);
IdSMTP1.Disconnect;
Czy ktoś widzi, gdzie jest bug?