[UWP] Windows Phone中的Smtp! [英] [UWP]Smtp in Windows Phone !
问题描述
大家好,
如何使用我的Windows应用程序中的SMTP发送邮件!
我曾尝试使用.Net中使用的普通Smtp邮件代码:
Hi all,
How can send mail in background using SMTP in my Windows App !
I had tried the ordinary Smtp mailing code's used in .Net using :
using System.Net;
using System.Net.Mail;
它根本不起作用。
我该怎么办?
我使用Windows Universal Apps?
有什么想法?
请分享!
$
谢谢。
It's not working at all.
How can i do it ?
I working with Windows Universal Apps ?
Any idea ?
Please Share !
Thanks.
推荐答案
在Windows Universal App中使用System.Net.Mail名称空间是不可用的。
It is not available to use System.Net.Mail namespace in Windows Universal App.
我认为你有必要检查一下Rob的回复。这种情况:http://stackoverflow.com/questions/28927025/is-it-possible-to-use-system-net-mail-in-a-windows-app
I think it worth for you to have check of Rob's reply in this case: http://stackoverflow.com/questions/28927025/is-it-possible-to-use-system-net-mail-in-a-windows-app
如果您必须发送电子邮件,请尝试以下代码:
If you have to send email, try the following code:
var mailto = new Uri("mailto:?to=user@mail.com&subject=subject&body=Message");
await Windows.System.Launcher.LaunchUriAsync(mailto);
这篇关于[UWP] Windows Phone中的Smtp!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!