This is a discussion on How to read inbox messages in windows mobile and create it as a text file using C#? within the Windows Mobile forums, part of the Mobile Software Development category; How to read inbox messages in windows mobile and create it as a text file using C#?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| We have to use InTheHand tool for read inbox....we can download the InTheHand tool from 32feet.NET website.... public InTheHand.WindowsMobile.PocketOutlook.OutlookSessi on session = new InTheHand.WindowsMobile.PocketOutlook.OutlookSessi on(); int i = 1; TextWriter tw = new StreamWriter(@"\My Documents\inbox.txt"); foreach (InTheHand.WindowsMobile.PocketOutlook.SmsMessage smsMessage in session.SmsAccount.Folders["Inbox"]) { tw.WriteLine("Number :" + i); tw.WriteLine("From :" + smsMessage.From.Name.ToString()); tw.WriteLine("Date :" + smsMessage.Received); tw.WriteLine("Body :" + smsMessage.Body.ToString()); tw.WriteLine(""); i++; } tw.Close(); MessageBox.Show("File is Created"); |
| |||
| Hi, Can we create Xml file for store the values of inbox messages
__________________ Krishnakumar.S Beware of Everything -that is un true; stick to the Truth shall succeed slowly but steadily |
| |||
| Hi, U can create xml file for storing the inbox messages by using third party tool called InTheHand library... Here code follows, public InTheHand.WindowsMobile.PocketOutlook.OutlookSessi on session = new InTheHand.WindowsMobile.PocketOutlook.OutlookSessi on(); int i = 1; XmlTextWriter textWriter = new XmlTextWriter(@"\My Documents\inbox.xml", Encoding.UTF8); textWriter.WriteStartDocument(); textWriter.WriteComment("<?xml-stylesheet type=text/xsl href=XSLTInbox.xsl?>"); textWriter.WriteStartElement("Inbox"); foreach (InTheHand.WindowsMobile.PocketOutlook.SmsMessage smsMessage in session.SmsAccount.Folders["Inbox"]) { textWriter.WriteStartElement("Message"); textWriter.WriteStartElement("MessageNo"); textWriter.WriteString(i.ToString()); textWriter.WriteEndElement(); textWriter.WriteStartElement("From"); textWriter.WriteString(smsMessage.From.Name.ToStri ng()); textWriter.WriteEndElement(); textWriter.WriteStartElement("Date"); textWriter.WriteString(smsMessage.Received.ToStrin g()); textWriter.WriteEndElement(); textWriter.WriteStartElement("Body"); textWriter.WriteString(smsMessage.Body.ToString()) ; textWriter.WriteEndElement(); textWriter.WriteEndElement(); i++; } textWriter.WriteEndElement(); textWriter.WriteEndDocument(); textWriter.Close(); MessageBox.Show("Xml File is created");
__________________ H2O Without us, no one can survive.. |
| |||
| Hi, I have used the above code for create xml file and text file... I have read the message from inbox which has already in inbox... Can we read the messages at the time of received the message to my mobile and have to write in text file using C#.. Can anyone suggest me....
__________________ Krishnakumar.S Beware of Everything -that is un true; stick to the Truth shall succeed slowly but steadily |
![]() |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/windows-mobile/2650-how-read-inbox-messages-windows-mobile-create-text-file-using-c.html | |||
| Posted By | For | Type | Date |
| DiscussWeb IT Community - Fusing | This thread | Refback | 08-09-2007 05:57 AM |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to read the text from a .pdf file? | vadivelanvaidyanathan | Software Testing | 0 | 01-28-2008 10:15 PM |
| convert Excel file to CSV(or text) file using java | mobilegeek | Java Programming | 2 | 09-06-2007 06:42 AM |
| If you Receive error messages when you try to upload a file to an ASP.NET Web page b | kingmaker | ASP and ASP.NET Programming | 1 | 07-24-2007 12:11 AM |
| Method in read the file | prasath | Java Programming | 1 | 07-17-2007 12:12 AM |
| New T-Mobile phone runs Windows Mobile 6 | vadivelanvaidyanathan | The Lounge | 0 | 05-22-2007 08:19 AM |