[Delphi 2010] wysyłanie maili

0

Siemka. Teoretycznie wszystko działa. Ba, udało mi się wysłać nawet 3 maile, ale potem przestało działać, nie wiem dlaczego. A więc, używam (do wysyłania maili) Indy 10

Procedurka wygląda tak:

   IdSMTP1.AuthType:= satSASL;
   IdSMTP1.Host := 'poczta.interia.pl';
   IdSMTP1.Port := 587;
   IdSMTP1.Username := 'login';
   IdSMTP1.Password := 'pass';
   IdSMTP1.Connect;
   Sleep(1000);
   if IdSMTP1.Connected then
    IdMessage1.From.Address:= '[email protected]';
    IdMessage1.Recipients.EMailAddresses:= 'mail_odbierajacego';
    IdMessage1.Subject:= 'temat';
    IdMessage1.Body.Append('wiadomosc');
    try
    IdSMTP1.Send(IdMessage1);
   Sleep(1000);
   finally
   IdSMTP1.Disconnect;
   Application.Terminate;

Zgodnie z instrukcją, zrobiłem mechanizm SASL na Login, czyli uwierzytelnianie powinno działać, lecz nie działa. Ciągle wypada błąd, że brak uwierzytelniania.

Oto instrukcja, której się trzymałem:

  1. Drop a SASL mechanism component on your form. Those components are located on the new Indy SASL tab in the component palette.
  2. In TIdSMTP, set the AuthType property to atSASL.
  3. In TIdSMTP, click the button beside the SASLMechanisms property. An editor will appear.
  4. Select the SASL mechanism components you wish to use with TIdSMTP from the available listbox.
  5. Click the RIght arrow to move those to the Assigned listbox.
  6. Click Ok when you are finished.
0

Może to przez SSL?

1 użytkowników online, w tym zalogowanych: 0, gości: 1