Symbian OS
read last symbian news on www.newlc.com read last symbian reviews on www.newlc.com
read last symbian tutorial on www.newlc.com read last symbian download on www.newlc.com
2 mars 2007 - 07:35

The RSendAsMessage has been introduced in Symbian v9 and greatly simplifies the sending of a short messages (SMS) in C++.

// Link against sendas2.lib
#include <rsendas.h>
#include <rsendasmessage.h>
#include <senduiconsts.h>

...

 // Open a connection with the SendAs server
 RSendAs saSrv;
 saSrv.Connect();
 CleanupClosePushL(saSrv);
       
// Create your message
RSendAsMessage msg;
msg.CreateL(saSrv, KSenduiMtmSmsUid);
CleanupClosePushL(msg);
msg.AddRecipientL(aRecipientNumber,RSendAsMessage::ESendAsRecipientTo);       
msg.SetBodyTextL(aMessageText);
 
// Send the message
msg.SendMessageAndCloseL();
       
// Cleanup
CleanupStack::Pop(&msg);
CleanupStack::PopAndDestroy(&saSrv);

Tutorial posted mars 2nd, 2007 by eric

Soumis par Anonymous le lun, 2007-03-05 07:32.

Hi Eric, I have a question. Where from have you got "KSenduiMtmSmsUid"? I want Uid for mail. Can u please help me out? Thanks in advance, Nil

Soumis par Anders (non vérifié) le ven, 2007-03-09 20:32.

Hi Nil

Yoy can use the CSendAsMessageTypes to query about available messagetypes and also find the human readable form of the message types. See the Symbian docs e.g http://www.symbian.com/developer/techlib/v9.1docs/doc_source/reference/reference-cpp/N1026A/CSendAsMessageTypesClass.html#%3a%3aCSendAsMessageTypes I Guess you can also have a look at where the constant KSenduiMtmSmsUid is defined and look for the mail equivalent.

Also, there is a minor fault in the example. The local RSendAsMessage variable is sometimes called message and sometimes message. But I guess you got that one.

/Anders


Soumis par Anonymous le mer, 2007-03-14 14:07.

How and where do you define KSenduiMtmSmsUid?

Thanks


Soumis par eric le mer, 2007-03-14 14:13.

It is in senduiconsts.h

Soumis par iworktech_sameer le mar, 2007-08-07 15:13.

Thanks Eric,

Using this article, now i able to send SMS.

Now i want to read incomming SMS & if that came from any perticular number,
i want to read text body of that sms and write that text in .txt file.

I found couple of examples on this site.
But i just want to know that is there any easier method in Symbian v9 like (easy method for sending sms in symbian V9) "RSendAsMessage".

Thanks


Soumis par gopikishan le jeu, 2009-05-14 08:09.

Hi eric,

now i able to send SMS throught RsendAs method,

Now i want to read incomming SMS .
is there any thing which RsendAs can do the reading sms.if that so please send me the code...
or
any method to read sms..



copyright 2003-2009 NewLC SARL