 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Saulo Guest
|
Posted: Wed Oct 26, 2005 4:23 am Post subject: Problem Sending Multipart E-mail Message |
|
|
Hi,
I'm using BCB 6 with Indy 9 and I need help to send e-mails with a
text/plain and text/html parts in the same message.
I'm using this code but it's not working for me:
SMTP->Connect();
TIdMessage *IdMessage1 = new TIdMessage(NULL);
IdMessage1->IsEncoded = true;
IdMessage1->ContentType = "multipart/alternative";
TIdText *aTextPart = new TIdText(IdMessage1->MessageParts,NULL);
aTextPart->ContentType = "text/plain";
aTextPart->ContentTransfer = "quoted-printable";
aTextPart->Body->Add("This the plain text part!");
TIdText *aHtmlPart = new TIdText(IdMessage1->MessageParts,NULL);
aHtmlPart->ContentType = "text/html";
aHtmlPart->ContentTransfer = "quoted-printable";
mStream->Position = 0; // it contains the html code part
aHtmlPart->Body->LoadFromStream(mStream);
... regular stuff already tested for Recipients, Subject, FromName,
ReplyTo....
SMTP->Send(IdMessage1);
SMTP->Disconnect();
What could be wrong? Am I initializing the messageparts in the wrong
way?
Should I be using the IdMessage1->Body in some particular way? (here
I'm not initializing it)
Saulo I. Regis
|
|
| Back to top |
|
 |
Saulo Guest
|
Posted: Thu Oct 27, 2005 1:59 am Post subject: Re: Problem Sending Multipart E-mail Message |
|
|
With the code I presented in the previous message I'm receiving the
following message from my ISP SMTP Server (qmail)
****************************
MessageWall: SMTP/FATAL: Server sent a bare LF; please see
http://cr.yp.to/docs/smtplf.html
****************************
I changed the code line
aTextPart->Body->Add("This the plain text part!");
to
aTextPart->Body->Text = "This the plain text part!";
and the same fatal error comes from the SMTP Server.
What could be generating this error?
An advice, please...
Saulo I. Regis
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|