Hi Staff,
I got this code from http://wiki.forum.nokia.com/index.ph...s_with_RSendAs.
I modified as fellowing:
void CPrinterDriverAppUi::SendEmail(const TDesC& Receiver, const TDesC& Subject, const TDesC& body)
{
RSendAs send;
User::LeaveIfError(send.Connect());
CleanupClosePushL(send);
RSendAsMessage sendAsMessage;
sendAsMessage.CreateL(send, KUidMsgTypeSMTP);
CleanupClosePushL(sendAsMessage);
sendAsMessage.SetSubjectL(Subject);
sendAsMessage.AddRecipientL(
Receiver,RSendAsMessage::ESendAsRecipientTo);
//adding to field
sendAsMessage.SetBodyTextL(body);
TRequestStatus status;
//adding attachments
sendAsMessage.AddAttachment(_L("c:\\data\\splash.bmp"),status);
User::WaitForRequest(status);
sendAsMessage.SendMessageAndCloseL();
CleanupStack::Pop();
CleanupStack::PopAndDestroy();
}
I compiled this and run on my phone E62. but it could not send email. Please help me to solve this problem.
Thanks in advanced!





