Einzelnen Beitrag anzeigen

Adamo

Registriert seit: 5. Jul 2006
7 Beiträge
 
#1

Problem mit Indy9/SMTP - HTML Mails mit Anhang

  Alt 15. Aug 2007, 08:40
Ich habe ein Problem beim verschicken von HTML Mails mit Anhang.
Ich hole sie über POP3 ab, speichere die Mail in IdMessage und schicke sie dann über SMTP weiter.


Der Code recht simpel:

Delphi-Quellcode:
.
.
  POP.Connect;
  POP.Retrieve(0, Msg);
.
.

  IdSMTP1.AuthenticationType := atLogin; {Simple Login}

  IdSMTP1.Username := SmtpServerUser;
  IdSMTP1.Password := SmtpServerPassword;

  IdSMTP1.Host := SmtpServerName;
  IdSMTP1.Port := SmtpServerPort;


  Msg.Recipients.EMailAddresses := '****@***.de';
  IdSMTP1.Connect;
  try
    IdSMTP1.Send(Msg);
  finally
    IdSMTP1.Disconnect;
  end;
Was ankommst. Sieht dann aber so aus beim HTML Mails mit Anhang:

--=oreStuf_2altzzz1234sadvnqw3nerasdf
Content-Type: text/plain; charset=s-ascii"
Content-Transfer-Encoding: quoted-printable

Testststststts#+

Askj

Adlksj

Asdlkjh#








--=oreStuf_2altzzz1234sadvnqw3nerasdf
Content-Type: text/html; charset=s-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns="urn:schemas-microsoft-comfficeffice" xmlns:w="urn:schemas-microsoft-comffice:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <meta name=Generator content="Microsoft Word 12 (filtered medium)"> <style>
<!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
  Mit Zitat antworten Zitat