[UWP] Windows Phone中的Smtp! [英] [UWP]Smtp in Windows Phone !

查看:84
本文介绍了[UWP] Windows Phone中的Smtp!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



如何使用我的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屋!

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