Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi Indy und STARTTLS (https://www.delphipraxis.net/40820-indy-und-starttls.html)

Ricane 21. Feb 2005 16:35


Indy und STARTTLS
 
Moin,

ich versuche gerade eine Mail per Indy raus zu senden, aber es will auf biegen und brechen nicht klappen. Er erzählt mir immer das

Must issue a STARTTLS command first.

Dabei weiss ich nicht einmal, was er mir damit sagen möchte...

Hier ist mein Code:

Delphi-Quellcode:
  If Not (ISConnectedToInternet) Then
    InternetAutodial(internet_autodial_force_online, frmMain.Handle);

  If ISConnectedToInternet Then
  Begin
    frmMails.IdSMTP1.Host := frmEinstellungen.edtSMTPServer.Text;
    frmMails.IdSMTP1.Port := StrToInt(frmEinstellungen.edtSMTPPort.Text);
    frmMails.IdSMTP1.Username := frmEinstellungen.edtSMTPBenutzer.Text;
    frmMails.IdSMTP1.Password := frmEinstellungen.edtSMTPPass.Text;

    With frmMails.IdMessage1 Do
    Begin
      From.Text := frmEinstellungen.edtSMTPMailAdresse.Text;
      ReceiptRecipient.Text := From.Text;
      ReplyTo.EMailAddresses := frmEinstellungen.edtSMTPAntwort.Text;
      Recipients.EMailAddresses := Adressen;
      Subject := frmMails.edtdbBetreff.Text;

      Body.Assign(frmMails.dbmemText1.Lines);
      Body.Add(Chr(10) + Chr(10));
      Body.Assign(frmMails.dbmemText2.Lines);
      Body.Add(Chr(10) + Chr(10));
      Body.Assign(frmMails.dbmemText3.Lines);
      Body.Add(Chr(10) + Chr(10));
      Body.Assign(frmMails.dbmemText4.Lines);
      Body.Add(Chr(10) + Chr(10));
      Body.Assign(frmMails.dbmemText5.Lines);
      Body.Add(Chr(10) + Chr(10));
      Body.Assign(frmMails.dbmemText6.Lines);

      Case frmMails.cmbPrio.ItemIndex Of
        0: Priority := mpLowest;
        1: Priority := mpLow;
        2: Priority := mpNormal;
        3: Priority := mpHigh;
        4: Priority := mpHighest;
      End;

      frmMails.IdSMTP1.Username := frmEinstellungen.edtSMTPBenutzer.Text;
      frmMails.IdSMTP1.Password := frmEinstellungen.edtSMTPPass.Text;
      frmMails.IdSMTP1.Host := frmEinstellungen.edtSMTPServer.Text;
      frmMails.IdSMTP1.Port := StrToInt(frmEinstellungen.edtSMTPPort.Text);

      frmMails.IdSMTP1.Connect;
      Try
        frmMails.IdSMTP1.Send(frmMails.IdMessage1);
      Finally
        frmMails.IdSMTP1.Disconnect;
      End;
    End;
  End;
Der Fehler tritt zwischen Try und Finally auf, also beim Senden... Jemand ne Idee?


Besten Dank,

Ricane

Ricane 25. Feb 2005 16:38

Re: Indy und STARTTLS
 
*PushIt*

Hat keiner eine Antwort parat?! Auch nach längerem Suchen, kam mir immer noch keine Lösung...


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:56 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz