Autor Beitrag
bogner
Hält's aus hier
Beiträge: 4



BeitragVerfasst: Sa 05.05.07 21:40 
Hallo !

Ich arbeite gerade an einem EMail-Prog in Delphi 5, indem ich versuche im BODY der Email eine HTML-Seite zu verschicken - kein plaintext, da ich auch Bilder anzeigen möchte. Die HTML-Seite soll natürlich auch beim Empfänger im BODY angezeigt wird.

Leider hab ich bisher noch keine Lösung gefunden. Ich kann lediglich plaintext versenden. Als Attachment kann ich so ne Seite auch anhängen, aber das ist nur die zweitbeste Variante. BITTE um Hilfe !

Zusatz:
- Ich arbeite mit Deplhi 5.
- EMail Versand mit der NMSMTP1 - Komponente.

Danke !

Bogner


Moderiert von user profile iconNarses: Topic aus Sonstiges (Delphi) verschoben am Fr 12.10.2007 um 15:36
lord.paddington
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 76



BeitragVerfasst: Sa 22.09.07 17:57 
Titel: Lösung gefunden???
Hallo!

Ich stehe vor dem gleichen Problem!

Hast du schon eine Lösung gefunden???



Gruß Eure Lordschaft

_________________
pfutsch ist hin und hin ist pfutsch
network-virus
Hält's aus hier
Beiträge: 8



BeitragVerfasst: Fr 12.10.07 00:42 
Habt ihr schon eine Lösung gefunden...ich stehe gerade vor dem gleichen Problem...


mfg
Stephan
chrisdrury
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 184

WinXP
D5 Prof
BeitragVerfasst: Fr 12.10.07 09:30 
Für Outlook gibt es eine entsprechende Komponente bei den OfficePartners von Turbopower, die kanns auch mit HTML Body. :wink:
[url]www.turbopower.com[/url]
Timosch
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1314

Debian Squeeze, Win 7 Prof.
D7 Pers
BeitragVerfasst: Fr 12.10.07 15:35 
user profile iconchrisdrury hat folgendes geschrieben:
Für Outlook gibt es eine entsprechende Komponente bei den OfficePartners von Turbopower, die kanns auch mit HTML Body. :wink:
[url]www.turbopower.com[/url]

Ich glaube, die wollens nicht über Outlook machen, sondern selber. Außerdem kann man ein Programm wie Outlook beim Anwender nicht einfach voraussetzen.

Kann man da nicht irgendwo den MIME-Type einstellen?

_________________
If liberty means anything at all, it means the right to tell people what they do not want to hear. - George Orwell
JoelH
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 806
Erhaltene Danke: 17

Win10
Delphi Alexandria 11.2 Patch 1
BeitragVerfasst: Di 16.10.07 14:20 
Ich benutz leider eine neuere Delphiversion, aber wahrscheinlich sollte das auch bei dir gehen. Du musst den Contenttype der Message auf 'text/html' setzen.

Ich mach das so.
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
procedure TForm1.Button1Click(Sender: TObject);
var s_email: string;
    msg_mail: TIdMessage;
    msg_Attachment: TIdAttachmentfile;
begin
  smtp_mob.Username := 'user';
  smtp_mob.Password := 'pass';
  msg_mail := TIdMessage.Create( smtp_mob);
  msg_Mail.Clear;
  msg_Mail.Body.Clear;
  msg_mail.ContentType := 'text/html';
  with msg_Mail.Body do
  begin
    Add(Edit2.Text);
  end;
  msg_Mail.From.Address := 'testmailer@gmx.de';
  msg_Mail.ReplyTo.EmailAddresses := '';
  s_email := Edit1.text;
  if s_email <> '' then
  begin
    msg_Mail.Recipients.EmailAddresses := s_eMail;
    msg_Mail.Subject := 'Test-eMail';
    if chk_attachment.checked then
    begin
      msg_Attachment := TIDAttachmentfile.Create( msg_mail.MessageParts, ExtractFilePath( Application.EXEname) + 'testmailtext.txt');
      msg_Attachment.FileIsTempFile := true;
    end;
    smtp_mob.Connect;
    b_connect := smtp_mob.Connected;
    if b_connect then
    begin
      smtp_mob.Send( msg_Mail);
      smtp_mob.Disconnect;
      b_connect := false;
    end;
  end;
  msg_Mail.Clear;
end;

_________________
mfg. Joel