Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attachments in Indy 10 C++

Status
Not open for further replies.

401KGuru

IS-IT--Management
Dec 24, 2007
2
US
I've a CodeGear2007 C++ small app to send a msg with an attachment, using Indy 10...but for the life of me I cannot get the attachment syntax/code thread to work...here's a few things I've tried --to no avail...I really feel like its probably easy/straight forward [ as most Indy stuff is]..but #@&%##()....expletive deleted...
>>>>>>>
msg->OnCreateAttachment();//this needs parms???
msg->MessageParts->Add()->ContentDescription = "TestFile";//this bombs--bad pointer
smtp->Connect("smtpauth.earthlink.net",587);//same here
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";
}
//---------------------------------------------------------------------------
>>>>>>>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top