Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Delphi6: Mit SMTP Mails verschicken.

Empfohlene Antworten

Veröffentlicht

Ich versuche, mit einer NMSMTP-Komponente eine Mail zu verschicken. Das klappt auch wunderbar bis auf einige Schönheitsfehler: In der Mail befindet sich immer als erstes eine Leerzeile und das Sendedatum wird nicht angezeigt. Wie kann ich das beheben? Der Quellcode:

procedure TfrmWinMail.btnSendClick(Sender: TObject);

begin

  with SMTP do

  begin

    Connect;

    with PostMessage do

    begin

      ToAddress.Clear;

      ToAddress.Add(edToAddress.Text);

      Subject := edSubject.Text;

      Body.Clear;

      Body.Add(edBody.Text);

    end;

    SendMail;

    MessageDlg('E-Mail verschickt.', mtInformation, [mbOK], 0);

    Disconnect;

  end;

end;

Host, FromAddress und FromName hab ich in den Eigenschaften schon festgelegt. Charset steht auf us-ascii.

Da du Delphi 6 benutzt solltest du nicht die NM-Komponenten benutzen sondern die Indy-Komponenten.

Indy ist ein Opensource Projekt zur Einbindung der Internet-Protokolle in Delphi und wurde seit Delphi6 von Borland mit Delphi ausgeliefert.

http://www.indyproject.org/index.html

Wärst du so freundlich, mal kurz zu erläutern, wie man damit Mails verschickt und empfängt? Vielleicht etwas Code?! Thx!

Sorry, hab die SMTP komponente von Indy eigentlich noch nicht benutzt, aber die alten NM-Komponenten waren noch nie so toll. Das ist wohl auch der Grund warum Borland Indy mit ausliefert.

http://www.atozedsoftware.com/indy/Demos/index.html

Dort findest du ein Indy SMTP Demo.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.