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";
}
//---------------------------------------------------------------------------
>>>>>>>
>>>>>>>
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";
}
//---------------------------------------------------------------------------
>>>>>>>