Hi,

Assuming That I did the Encoding Process of Base64 to dowload a file from email message , I want a code that Download the buffer of file name (xx.Doc) and Save it on the Disk , here is the Dialog Form That I have and I want to add button called (Download) to do the Downloading process:

In the (Rss) file:
RESOURCE DIALOG r_email_form_dialog
{
flags = EEikDialogFlagNoDrag |
EEikDialogFlagNoTitleBar |
EEikDialogFlagFillAppClientRect |
EEikDialogFlagCbaButtons;
buttons = R_AVKON_SOFTKEYS_CANCEL;
//buttons = R_AVKON_SOFTKEYS_OK;
//buttons = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
form = r_email_form_detail;
}


RESOURCE FORM r_email_form_detail
{
flags = EEikFormUseDoubleSpacedFormat;
items =
{
DLG_LINE
{
type = EEikCtEdwin;
prompt = "From:";
id = ESocketsEmailFromEdwin;
control = EDWIN
{//EEikFormEditModeOnly | EEikFormUseDoubleSpacedFormat;
//EEikEdwinNoHorizScrolling | EEikEdwinResizable;
flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
width = 200;
lines = 1;
maxlength = 1000;
default_input_mode = EAknEditorTextInputMode;
};
},
//--->CC
DLG_LINE
{
type = EEikCtEdwin;
prompt = "CC:";
id = ESocketsEmailCCEdwin;
control = EDWIN
{
flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
width = 300;
lines = 1;
maxlength = 1000;
default_input_mode = EAknEditorTextInputMode;
};
},
DLG_LINE
{
type = EEikCtEdwin;
prompt = "Date:";
id = ESocketsEmailDateEdwin;
control = EDWIN
{
flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
width = 127;
lines = 1;
maxlength = 100;
default_input_mode = EAknEditorTextInputMode;
};
},
DLG_LINE
{
type = EEikCtEdwin;
prompt = "Subject:";
id = ESocketsEmailSubjectEdwin;
control = EDWIN
{
flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
width = 1000;
lines = 1;
maxlength = 1000;
default_input_mode = EAknEditorTextInputMode;
};
},
DLG_LINE
{
//
type = EEikCtEdwin;
prompt = "Message Body:";
id = ESocketsEmailBodyEdwin;
control = EDWIN
{
flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
width = 1000;
lines = 20;
maxlength = 10000;
default_input_mode = EAknEditorTextInputMode;
};
}
};
}

On CPP:

void CMyAppView::DisplayFormL(TInt aResourceId,TDesC& aFrom,TDesC& aSubject,TDesC& aCC,TDesC& aDate,TDesC& aBody)
{
//----->
HBufC* BufFrom;
BufFrom=aFrom.AllocL();//FromText.AllocL();
//---->
HBufC* BufCC;
BufCC=aCC.AllocL();
//------>
HBufC* BufDate;
BufDate=aDate.AllocL();
//------->
HBufC* BufSubject;
BufSubject=aSubject.AllocL();
//-------->
HBufC* BufBody;
BufBody=aBody.AllocL();
TPtrC ptrFrom(BufFrom->Des());
TPtrC ptrCC(BufCC->Des());
TPtrC ptrDate(BufDate->Des());
TPtrC ptrSubject(BufSubject->Des());
TPtrC ptrBody(BufBody->Des());
iEmailForm = new ( ELeave ) CEmailForm;
CleanupStack::PushL(iEmailForm);
iEmailForm->ConstructL();
CleanupStack::Pop();
iEmailForm->ExecuteLD(aResourceId);
iEmailForm->SetEditableL( ETrue );

STATIC_CAST( CEikEdwin*, ( iEmailForm->Control(ESocketsEmailFromEdwin) ) )
->SetTextL(&ptrFrom);
iEmailForm->SetEditableL( ETrue );
STATIC_CAST( CEikEdwin*, ( iEmailForm->Control(ESocketsEmailCCEdwin) ) )
->SetTextL(&ptrCC);
STATIC_CAST( CEikEdwin*, ( iEmailForm->Control(ESocketsEmailDateEdwin) ) )
->SetTextL(&ptrDate);
STATIC_CAST( CEikEdwin*, ( iEmailForm->Control(ESocketsEmailSubjectEdwin) ) )
->SetTextL(&ptrSubject);
STATIC_CAST( CEikEdwin*, ( iEmailForm->Control(ESocketsEmailBodyEdwin) ) )
->SetTextL(&ptrBody);
//DrawNow() ;

//----->
}

So What I should add On the (Rss,Cpp) file?