Re: Problem sending email with Exchange Server

Giganews Newsgroups
Subject: Re: Problem sending email with Exchange Server
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Tue, 13 Dec 2005

"Feijó" <fei…@x.suply.com> wrote in message
news:9A6087C370E5E240fei…@x.suply.com...

>        vMSG.Body.Text := aCritica.Text;
<snip>
>      html := TIdText.Create(vMSG.MessageParts);

You should not be using the TIdMessage.Body property if you use the
TIdMessage.MessageParts collection, and vice versa.  Use one or the other,
not both.

>      vMSG.Body.Clear;

Why are you filling in the TIdMessage.Body only to clear it afterwards?

> This work great with all smtp servers, but with Exchange the
> content of msg body is: 'This is a HTML email, you need better
> email reader.' All my text disapear!!!

Please show the raw message data that Send() actually transmits over the
socket.  Attach a TIdLog... component to the tIdSMTP, or use an external
packet sniffer such as Ethereal http://www.ethereal.com).

Gambit

Replies

In response to

Problem sending email with Exchange Server posted by Feijó on Tue, 13 Dec 2005