🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1956

TIdAttachment Problem with MIME Encoding

#1956
From: Robert Lieblich
Date: Wed, 20 Sep 2006 11:13
42 lines
2196 bytes
Hi,

i found a problem sending attachments via my BDS2006/Indy 9 SMTP test-application. If IdMessage1->Encoding is set to: meMIME, the received attachment has got 16 bytes appended, with meUU (UUencoding), everything is ok. 
Could this be a problem of my program, or is this a bug?
Can anyone confirm this?

And a second question: I tried to free some memory at the end with 
attach1->Free(); 
but then i get an Exception "EInvalidPointer" at this point. 
Why?

Best Regards 
Robert 

----------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
IdMessage1->Encoding=meUU;    //meMIME has a problem
TIdAttachment *attach1 = new TIdAttachment(IdMessage1->MessageParts, "c:\\attachment.txt" ) ;
attach1->ContentType= "multipart/mixed";
//
IdMessage1->From->Name="SENDERNAME";
IdMessage1->From->Address="SENDERADDRESS";
IdMessage1->Subject="Test BDS2006/Indy9 19.9.06"  ;
IdMessage1->Recipients->EMailAddresses=Edit2->Text;
IdMessage1->Body->Add( "Some text...");
//Sending...
IdSMTP1->Host=Edit7->Text;
if (CheckBox1->Checked==true)
	{
	IdSMTP1->Username=Edit4->Text  ;
	IdSMTP1->Password=Edit5->Text  ;
	IdSMTP1->AuthenticationType=atLogin;
	}
else   IdSMTP1->AuthenticationType=atNone;
IdSMTP1->Connect(4000);
IdSMTP1->Send(IdMessage1);
IdSMTP1->Disconnect();
IdMessage1->Clear();
//attach1->Free(); 
}
Technical Details
Message-ID: <45112258$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,edd2a3551c00f96a,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Robert Lieblich" <nospam@nospam.com>
Sender: "Robert Lieblich" <nospam@nospam.com>
Reply-To: "Robert Lieblich" <nospam@nospam.com>
Subject: TIdAttachment Problem with MIME Encoding
Newsgroups: borland.public.cppbuilder.internet.socket
X-User-Info: 145.253.232.148     
X-Forwarded-For: unknown
NNTP-Posting-Host: 207.105.83.66
Message-ID: <45112258$1@newsgroups.borland.com>
Date: 20 Sep 2006 04:13:28 -0700
X-Trace: newsgroups.borland.com 1158750808 207.105.83.66 (20 Sep 2006 04:13:28 -0700)
Lines: 42
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail