Sharing detail with email for windows mobile7 - windows-phone-7

I am working on an application for windows mobile 7.
I need to send some information from my application to some user via email.
I am using "EmailComposeTask()" for this. But i am getting error "email cant send. make sure u have setup an accout"
How to setup an email account in windows7 emulator.
Can anyone help me?
Following code i am using ...
emailComposeTask = new EmailComposeTask();
emailComposeTask.Body = textBox1.Text;
emailComposeTask.To = textBox2.Text;
emailComposeTask.From=TextBox3.Text;
emailComposeTask.Show();
Thanks

The EmailComposeTask can't be used in the emulator.
Your code seems correct, it should work on a real device.

Related

Stuck on subscribing to parse.com in windows 8.1 app

I am testing the Parse API and is trying to create an Windows 8.1 app.
I can signup and login, get current installation, but when I try to subscribe to a channel, the application freeze.
Using this code:
var ins = ParseInstallation.CurrentInstallation;
Debug.WriteLine(ins.InstallationId);
ins.AddUniqueToList("channels", "Test");
await ins.SaveAsync();
The SaveaAync does not ever return.
Anybody know how to solve this?
/Christian

Register custom app as default for handling sms sending and receveing

Register custom app as default for handling sms sending and receveing in windows phone
This is not possible with the current Windows Phone SDK. You can vote on the official Windows Phone Dev Feedback to indicate your interest in an SMS Access API.
The only thing you can do with the current SDK is launch the default SMS app with a predefined number and text:
SmsComposeTask smsComposeTask = new SmsComposeTask();
smsComposeTask.To = "2065550123";
smsComposeTask.Body = "Your text";
smsComposeTask.Show();
You can send SMS using the above mentioned method.But you cannot receive SMS in windows phone.
It is possible only in Windows Mobile platforms.
As far as I am aware, you cannot change the default apps in Windows Phone.
And addition. You'r program is being run in a sandbox - closed space for you'r application only. That means you cannot run/modify etc other 3 party programms. Only the default programs like Calculator and etc. are awailable

How to get useragent in XNA application?

I need to get useragent in my XNA-application to send to the server. I found an example of using JavaScript to get the useragent, but the code did not come, because it works only for silverlight.
Below is the solution provide on this URL. I feel it may suits you. Check it out:-
Getting the user agent string in an XNA based application
Solution:
For who is interested: I contacted the guy who's responsible for our server and he will make a user agent string, based on info that my application sends to the server. This is the info:
OperatingSystem = System.Environment.OSVersion.ToString();
DeviceManufacturer = (string)Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceManufacturer");
DeviceName = (string)Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceName");

Is EmailComposeTask Class already working?

For example here:
http://msdn.microsoft.com/en-us/library/ff769550(VS.92).asp
EmailComposeTask emailComposeTask = new EmailComposeTask();
emailComposeTask.To = "user#example.com";
emailComposeTask.Body = "Email message body";
emailComposeTask.Cc = "user2#example.com";
emailComposeTask.Subject = "Email subject";
emailComposeTask.Show();
I read it doesnt work yet.
I have a real device, and an application in the marketplace - it is definitely working. The reason it doesn't work on an emulator is that you can't set up an email account on the emulator, and the first step of the email compose task when it is run is to prompt the user to select which email account to send the email with (if you've got more than one)
Since you can't set one up on the emulator, it kicks back and you can't send an email.
The only way to test this (for now) is to debug on an actual WP7 device, but I can 100% guarantee this is working.
One thing to note about the email tasker is that you can't programmatically add attachments...yet.
Yes, it works on real devices (not on the emulator)
Just pasted your code into an app, deployed to a device and was presented with a choice of which of my email accounts I wanted to use for the email after which the email was prepared ready editing and sending.

How to send email with an attachment using Windows Phone 7 API?

My WP7 application requirement is to send the email with an attachment and use device default SMTP settings.
I have tried EmailComposeTask class but it doesn't have any member for attachment.
The other idea, i am thinking is to upload the file on server and then send the email from that server.
What you think if there is no way to send the email with an attachment using WP7 API?
Your observation is correct, at this point in time EmailComposeTask doesn't support attachments and this is the only facility to send email programatically from the device at the moment.
As you note, you can communicate with a server which can perform this task on behalf of your app.
I found a wp7 and wp8 library that does it: http://www.windowsphonegeek.com/marketplace/components/livemailmessage
Try to create web service to send mail in your webserver. so, we can call the from your app to send mail.
I hope upcoming version it will be possible!
Please check this URL for more details http://forums.silverlight.net/forums/p/209808/493532.aspx
I've found this article, but I did not make any test yet.
From the author:
EmailComposeTask won’t allow you to send attachments, but this doesn’t mean that you cannot send files through it. .NET Framework has these two amazing methods: Convert.ToBase64String and Convert.FromBase64String. The first will allow the developer to convert a byte array (byte[]) to a Base64-encoded string, the other one will do the same operation in reverse.
Reference:
Pushing the Limits of the Windows Phone SDK and Sending Files via EmailComposeTask

Resources