从wp7向gmail帐户发送电子邮件 [英] sending email from wp7 to gmail account

查看:130
本文介绍了从wp7向gmail帐户发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!
我正在开发WindowsPhone 7应用程序.我想在我的程序中制作一种将电子邮件发送到gmail帐户的方法,我知道asp.net的编码,但是对于wp7我还是很陌生,所以我不知道如何从Windows Phone 7平台向gmail帐户发送电子邮件将Silverlight应用程序用于wp7.有1个可以帮我吗?

hi!
Im Developing a WindowsPhone 7 App. i want to make a method in my program which sends email to a gmail account , i knew the coding for asp.net but as i m very new to wp7 so i dont knw how to send email from windows phone 7 plateform to gmail account, i m using silverlight app for wp7.can any 1 help me out ?

推荐答案

您可以使用EmailComposeTask使用电话上的一个电子邮件帐户向您发送电子邮件.请记住,此方法意味着用户将可以进行编辑,然后可能不发送电子邮件,但这是最简单的方法之一.

You can use the EmailComposeTask to use one of the email accounts on the phone to send you an email. Keep in mind that this method means that the user will get to edit and then possibly not send the email, but it is one of the simplest ways.

Microsoft.Phone.Tasks.EmailComposeTask emailComposeTask = new Microsoft.Phone.Tasks.EmailComposeTask();
 emailComposeTask.To = "tomail@localhost.com";
 emailComposeTask.Cc = "ccmail@localhost.com";
 emailComposeTask.Subject ="Your Subject here";
 emailComposeTask.Body = "Your mail content here";
 emailComposeTask.Show(); // Launches send mail screen



如果您希望用户完全不参与,那么我建议您在线使用一个Web服务,该服务将接收您想要发送的消息,并使用您已经提到的ASP.NET之类的东西来进行处理.



If you are looking to have the user not involved at all then I would suggest a web service online that would take the message you want to send and have it do it using something like ASP.NET like you already mentioned.


这篇关于从wp7向gmail帐户发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆