[W8.1]在后台Windows 8.1中发送邮件 [英] [W8.1]send mails in background Windows 8.1

查看:89
本文介绍了[W8.1]在后台Windows 8.1中发送邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我们要求在连接到网络时在后台发送邮件。我们从数据库和附件中获取的数据很少通过SMTP客户端发送。我们需要一些指导来实现以下场景

解决方案

嗨endeavouruser,


如果你想开发一个Windows 8.1商店应用程序通过SMTP客户端发送邮件,似乎Windows 8.1中没有方法。有一个关于它的博客。在博客中,它表示在Windows 8.1中专门用于邮件的WinRT堆栈中没有API。我们
应该能够使用邮件服务器发送它。请在此链接中查阅:  https://blogs.msdn.microsoft.com/mim/2013/11/29/sending-an-email-within-a-windows-8- 1-application-using-streamsocket-to-emulate-a-smtpclient /


在方案1中,我们可以使用  NetworkInformation.NetworkStatusChanged 事件连接。如果网络已连接,我们可以发送邮件。


在方案2中,我们可以创建后台任务,并使用  SystemTriggerType


在方案3中,它似乎没有前景或背景就不可能做到这一点。




最好的问候,


Jayden Gu


Hi All, We have an requirement to send mails in background when connected to network. We have few data from database and attachments to be sent through SMTP client. We need some guidelines to achieve below scenarios

解决方案

Hi endeavouruser,

If you want develop a Windows 8.1 store app to send mails through the SMTP client, it seems there is no methd in Windows 8.1. There is a blog about it. In the blog, it said  there is no API in the WinRT stack dedicated to mail in Windows 8.1. We should able to use the mail server to send that. Please refer it in this link: https://blogs.msdn.microsoft.com/mim/2013/11/29/sending-an-email-within-a-windows-8-1-application-using-streamsocket-to-emulate-a-smtpclient/.

In the scenario 1, we can use NetworkInformation.NetworkStatusChanged event that occurs when the network status changes for a connection. We can send the mail if the network is connected.

In the scenario 2, we can create a background task, and use InternetAvailable of the SystemTriggerType.

In the scenario 3, it seems it is not possible to do that without foreground or background.


Best Regards,

Jayden Gu


这篇关于[W8.1]在后台Windows 8.1中发送邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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