Board index » delphi » HTML e-mail not complete with Indy

HTML e-mail not complete with Indy


2004-02-03 06:37:59 PM
delphi175
Hello everybody,
I'm trying send HTML e-mail but when I receive it, it is not complete
(missing parts of html).
I'm using the TIdMessage and TIdSmtp of Indy. Can Somebody help me.
The implementation of sendemail function is:
try
IdSendMsg := TIdMessage.Create(SMTP);
IdSendMsg.SetUseNowForDate(True);
IdSendMsg.Subject := emailsubjet;
with TIdText.Create(IdSendMsg.MessageParts) do
begin
ContentType := 'text/plain';
Body.Add(bodytext);
end;
with TIdText.Create(IdSendMsg.MessageParts) do
begin
ContentType := 'text/html';
Body.Add(bodyhtml);
end;
IdSendMsg.From.Text := 'XXXX@XXXXX.COM';
IdSendMsg.From.name := 'myserver';
IdSendMsg.Recipients.EmailAddresses := emailaddress;
SMTP.Host := 'mail.myserver.es';
SMTP.Connect;
SMTP.Send(IdSendMsg);
...
Thanks for all
Javier Sosa
 
 

Re:HTML e-mail not complete with Indy

"Javier Sosa" <XXXX@XXXXX.COM>writes:
Quote
Hello everybody,

I'm trying send HTML e-mail but when I receive it, it is not complete
(missing parts of html).
I'm using the TIdMessage and TIdSmtp of Indy. Can Somebody help me.
The implementation of sendemail function is:

try
IdSendMsg := TIdMessage.Create(SMTP);
IdSendMsg.SetUseNowForDate(True);
IdSendMsg.Subject := emailsubjet;

<snip>
Hi Javier - try adding "IdSendMsg.IsEncoded := True;" after the TIDMessage.Create.
Best,
Dave
(replace NOSPAM with eims to reply)
 

Re:HTML e-mail not complete with Indy

Thanks Dave, but I was trying it and doesn't work. Have you got an other
idea?
Best, Javier.
"Dave Moore" <XXXX@XXXXX.COM>escribi?en el mensaje
Quote

"Javier Sosa" <XXXX@XXXXX.COM>writes:
>Hello everybody,
>
>I'm trying send HTML e-mail but when I receive it, it is not complete
>(missing parts of html).
>I'm using the TIdMessage and TIdSmtp of Indy. Can Somebody help me.
>The implementation of sendemail function is:
>
>try
>IdSendMsg := TIdMessage.Create(SMTP);
>IdSendMsg.SetUseNowForDate(True);
>IdSendMsg.Subject := emailsubjet;
>

<snip>

Hi Javier - try adding "IdSendMsg.IsEncoded := True;" after the
TIDMessage.Create.

Best,
Dave
(replace NOSPAM with eims to reply)
 

Re:HTML e-mail not complete with Indy

"Javier Sosa" <XXXX@XXXXX.COM>writes
Quote
I'm trying send HTML e-mail but when I receive it, it is not complete
(missing parts of html).
Please elaborate.
Quote
The implementation of sendemail function is:
There is nothing in your code that should be preventing you from sending
full messages.
Quote
IdSendMsg.SetUseNowForDate(True);
Do not call setter methods directly. Use the property instead:
IdSendMsg.tUseNowForDate := True;
Gambit
 

Re:HTML e-mail not complete with Indy

Dear Mr. Javier Sosa,
You might want check our demo of Mail Client with functionality similar to
Microsoft Outlook Express at
clevercomponents.com/demo/inetsuite/v34/MailClient.zip since it has
no problems with parsing attachments (including multi-part attachments in
MIME/UUEncode)
Full sources included to Clever Internet Suite v 3.4 installation available
at
www.clevercomponents.com/downloads/inetsuite.asp
Best regards,
Clever Components Team
www.clevercomponents.com
"Javier Sosa" <XXXX@XXXXX.COM>writes
Quote
Thanks Dave, but I was trying it and doesn't work. Have you got an other
idea?

Best, Javier.

"Dave Moore" <XXXX@XXXXX.COM>escribi?en el mensaje
news:401fb768$XXXX@XXXXX.COM...
>
>"Javier Sosa" <XXXX@XXXXX.COM>writes:
>>Hello everybody,
>>
>>I'm trying send HTML e-mail but when I receive it, it is not complete
>>(missing parts of html).
>>I'm using the TIdMessage and TIdSmtp of Indy. Can Somebody help me.
>>The implementation of sendemail function is:
>>
>>try
>>IdSendMsg := TIdMessage.Create(SMTP);
>>IdSendMsg.SetUseNowForDate(True);
>>IdSendMsg.Subject := emailsubjet;
>>
>
><snip>
>
>Hi Javier - try adding "IdSendMsg.IsEncoded := True;" after the
TIDMessage.Create.
>
>Best,
>Dave
>(replace NOSPAM with eims to reply)


 

Re:HTML e-mail not complete with Indy

Hi team, but my problem is when I send an email automatilly from a Internet
application. The email
is received correctly if it size is minor of 5 Kb, but when the e-amil is
longer>5-6 Kb, it is not complete and present missings parts, for example:
{ missing part}
<html>
...
...
...
<body>
...
...
<table...>
------------
{email received}
<tr>
...
...
...
...
</body>
</html>
I'm trying including in the source of de function IdSendMsg.UseNowForDate :=
True;
and IdSendMsg.IsEncoded := True;
and my e-mail not include attachments, only a text part and body in html.
Thank you very much!
"CleverComponents Team" <XXXX@XXXXX.COM>escribi?en el mensaje
Quote
Dear Mr. Javier Sosa,

You might want check our demo of Mail Client with functionality similar to
Microsoft Outlook Express at
clevercomponents.com/demo/inetsuite/v34/MailClient.zip since it has
no problems with parsing attachments (including multi-part attachments in
MIME/UUEncode)

Full sources included to Clever Internet Suite v 3.4 installation
available
at
www.clevercomponents.com/downloads/inetsuite.asp

Best regards,

Clever Components Team
www.clevercomponents.com

"Javier Sosa" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...
>Thanks Dave, but I was trying it and doesn't work. Have you got an other
>idea?
>
>Best, Javier.
>
>"Dave Moore" <XXXX@XXXXX.COM>escribi?en el mensaje
>news:401fb768$XXXX@XXXXX.COM...
>>
>>"Javier Sosa" <XXXX@XXXXX.COM>writes:
>>>Hello everybody,
>>>
>>>I'm trying send HTML e-mail but when I receive it, it is not complete
>>>(missing parts of html).
>>>I'm using the TIdMessage and TIdSmtp of Indy. Can Somebody help me.
>>>The implementation of sendemail function is:
>>>
>>>try
>>>IdSendMsg := TIdMessage.Create(SMTP);
>>>IdSendMsg.SetUseNowForDate(True);
>>>IdSendMsg.Subject := emailsubjet;
>>>
>>
>><snip>
>>
>>Hi Javier - try adding "IdSendMsg.IsEncoded := True;" after the
>TIDMessage.Create.
>>
>>Best,
>>Dave
>>(replace NOSPAM with eims to reply)
>
>


 

Re:HTML e-mail not complete with Indy

Thanks, but I don't stand my problem. I am trying your suggestion, but the
problem continue...
When the e-mail is minor to 5 Kb, no problem, but if it is longer the html
content is not complete. Missing header and some initial tags...
Thanks for your help.
Javier Sosa
"Remy Lebeau (TeamB)" <XXXX@XXXXX.COM>escribi?en el
mensaje news:401ff595$XXXX@XXXXX.COM...
Quote

"Javier Sosa" <XXXX@XXXXX.COM>writes
news:401f7a3a$XXXX@XXXXX.COM...

>I'm trying send HTML e-mail but when I receive it, it is not complete
>(missing parts of html).

Please elaborate.

>The implementation of sendemail function is:

There is nothing in your code that should be preventing you from sending
full messages.

>IdSendMsg.SetUseNowForDate(True);

Do not call setter methods directly. Use the property instead:

IdSendMsg.tUseNowForDate := True;


Gambit


 

Re:HTML e-mail not complete with Indy

"Javier Sosa" <XXXX@XXXXX.COM>writes
Quote
I'm trying your suggestion, but the problem continue...
What I suggested about the property had nothing to do with this issue. It
was just a general suggestion.
Quote
When the e-mail is minor to 5 Kb, no problem, but if it is longer the html
content is not complete. Missing header and some initial tags...
Then please show your actual code that is building up the message content in
the first place.
Gambit
 

Re:HTML e-mail not complete with Indy

Thanks Gambit, but I was tryed this solution yesterday and the result is
equal. I am delete the "text/plain" part into the message and too missing
code in html...
Also thank you very much....
Javier Sosa
"Remy Lebeau (TeamB)" <XXXX@XXXXX.COM>escribi?en el
mensaje news:4020b659$XXXX@XXXXX.COM...
Quote

"Javier Sosa" <XXXX@XXXXX.COM>writes
news:4020ac39$XXXX@XXXXX.COM...

>I'm trying your suggestion, but the problem continue...

What I suggested about the property had nothing to do with this issue. It
was just a general suggestion.

>When the e-mail is minor to 5 Kb, no problem, but if it is longer the
html
>content is not complete. Missing header and some initial tags...

Then please show your actual code that is building up the message content
in
the first place.


Gambit