×
Namespaces

Variants
Actions

Sending VCal using RsendAsMessage

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Compatibility
Platform(s):
Symbian
Article
Created: alice77 (14 Feb 2008)
Last edited: hamishwillee (14 Jun 2013)

Warning.pngThis article does not meet the wiki quality standards: Please make it more useful by adding links or additional information as discussed in the quality standards. When you have done so you can delete the {{NeedsMoreWork}} template from the article to remove this warning.


Code for sending emails

Following is sample code to send VCal as SMS.
 
RSendAs sendas;
TInt res = sendas.Connect();
User::LeaveIfError(res);
CleanupClosePushL(sendas);
 
RSendAsMessage message;
TRAP(res, message.CreateL(sendas, KSenduiMtmSmsUid));
User::LeaveIfError(res);
CleanupClosePushL(message);
 
message.SetBioTypeL(KMsgBioUidVCalendar);
TBuf<512> MsgText;
MsgText.Copy(_L("//SKCE2\r\nBEGIN:VCALENDAR\r\nVERSION:1.0 \r\nBEGIN:VEVENT\r\nDESCRIPTION:Staff Meeting\r\nDTSTART:20080704T100000\r\nDTEND:20080704T120000\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n"));
message.SetBodyTextL(MsgText);
TBuf<15> RecAdd;
RecAdd.Copy(_L("123456789"));
message.AddRecipientL(RecAdd,RSendAsMessage::ESendAsRecipientTo );
 
 
message.SendMessageAndCloseL();
CleanupStack::Pop(1); // RMessage
CleanupStack::PopAndDestroy(1); // RSendAs
This page was last modified on 14 June 2013, at 09:29.
26 page views in the last 30 days.