c# - Sending email from Windows Phone 7 application -


I want to send an e-mail in my Windows Phone 7 application where the message body is in the data from my previous page Should I have already integrated the e-mail facility in my application like this:

  Private Zero Image_email (Object Sender, Routing Aventure E) {EmailComposeTask emailComposeTask = new EmailComposeTask (); EmailComposeTask.Subject = "Message subject"; EmailComposeTask.Body = "Message Body"; EmailComposeTask.To = "recipient@example.com"; EmailComposeTask.Cc = "cc@example.com"; EmailComposeTask.bcc = "bcc@example.com"; EmailComposeTask.Show (); }   

But I was not able to test it in my emulator. Now in the body section, I want my data from the previous page. So how to do it?

Updated code:

  If (this.NavigationContext.QueryString.ContainsKey ("Date_Start")) {// If it is available, then parameter value date = navigation contact .QueryString ["Date_Start"]; Datee.Text = date; } If (this.NavigationContext.QueryString.ContainsKey ("News_Title")) {// If it is available, get the parameter value ntitle = NavigationContext.QueryString ["News_Title"]; Title. Text = nitlal; } (This.NavigationContext.QueryString.ContainsKey ("News_Description")) {ndes = NavigationContext.QueryString ["News_Description"]; Description. Text = ndes; }   

Now what do I write in the message body? I am not able to test it because I do not have a device. Can I pass through such values:

  emailComposeTask.Body = "title, ndes, date";    

I think the code is correct if you want to pass body from the previous page , You have to pass it when page navigation And set up email. Compose Task. Body = your password value Like this:

  var date; Var title; Var ndes; EmailComposeTask.Body = title + "," + ndes + "," + date;    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -