Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi Wie kann ich Emailtext (versand über idSmtp)in nächste Zeile (https://www.delphipraxis.net/5616-wie-kann-ich-emailtext-versand-ueber-idsmtp-naechste-zeile.html)

bundy 13. Jun 2003 12:42


Wie kann ich Emailtext (versand über idSmtp)in nächste Zeile
 
Hallo

Ich habe mir einen Automailer geschrieben mit Indi Comp.

Wenn ich den Text aus einem Memo Feld benutze dann schreibt er das ganze Mail in einer Wurst.
Wie kann ich eine Entertaste posten? :wall:
Delphi-Quellcode:
procedure sendmail (von,an,Betreff,Text,Absender:string) ;
begin
  Form1.IdMessage1.Clear;

  // Plain Text
  with TIdText.Create(Form1.IdMessage1.MessageParts, nil) do
  begin
    ContentType := 'text/plain';
    Body.Text := 'Das sieht der Text-Viewer Betrachter';

  end;

  // HTML Part
  with TIdText.Create(Form1.IdMessage1.MessageParts, nil) do
  begin
    ContentType := 'text/html';
    Body.Text := Text;
    Body.Add(#13);
    Body.Add('ssssssssssss');


  end;

  Form1.IdMessage1.ContentType := 'text/html';
  Form1.IdMessage1.From.Address :=von;
  Form1.IdMessage1.From.Name := Absender;
  Form1.IdMessage1.Subject := Betreff;
  Form1.IdMessage1.Recipients.Add.Address := an;

  ShowMessage(IntToStr(Form1.IdMessage1.MessageParts.Count));

  Form1.IdSMTP1.Connect;
  try
    Form1.IdSMTP1.Send(Form1.IdMessage1);
  finally
    Form1.IdSMTP1.Disconnect;
  end;


end;
[Edit=Sakura]Delphi-Tag geschlossen. MfG[/Edit]

Mario 13. Jun 2003 15:13

Ein Zeilenumbruch ist normalerweise: #13#10. Weiß aber nicht, ob das jetzt Dein Problem ist.


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:59 Uhr.

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