Article View: borland.public.cppbuilder.internet.socket
Article #671Simple Create Attachment() question
From: CharlesLeggette
Date: Mon, 24 Dec 2007 21:24
Date: Mon, 24 Dec 2007 21:24
25 lines
1874 bytes
1874 bytes
I'm trying to attach a file and send it....but the C++ syntax is not very
intuitive..below is a couple of things I've tried without luck...any help
would be appreciated - thanks.
msg->OnCreateAttachment();///this needs parms???
msg->MessageParts->Add()->ContentDescription = "TestFile";
msg->MessageParts->Add()->ContentLocation= "C:\\Ada\\Src\\plan.cpp";//seems
to be right syntax but bombs -- bad pointer????
smtp->Connect("smtpauth.earthlink.net",587);
smtp->Send(msg);
}
catch(Exception *e)
{
::Sleep(1);
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::msgCreateAttachment(const TIdMessage *AMsg, const
TStrings *AHeaders, TIdAttachment *&AAttachment)
{
AAttachment->ContentLocation= "C:\\Ada\\Src\\plan.cpp";
AAttachment->ContentDescription = "C:Ada.Src.plan.cpp";
}
//---------------------------------------------------------------------------
Technical Details
Message-ID:
<477023a5$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,131c53c1624cdd7c,start X-Google-Attributes: gid11508e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "CharlesLeggette" <charlesleggette@earthlink.net> Newsgroups: borland.public.cppbuilder.internet.socket Subject: Simple Create Attachment() question Date: Mon, 24 Dec 2007 15:24:54 -0600 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 NNTP-Posting-Host: 66.60.79.20 Message-ID: <477023a5$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1198531493 66.60.79.20 (24 Dec 2007 13:24:53 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail