延迟在C#中发送电子邮件,发送电子邮件

2023-09-03 00:29:26 作者:该用戶已成仙

我们正在编写一个功能发送电子邮件提醒客户在几天内x次,只是不知道是否有可能延迟发送类似于如何在Outlook(新邮件>选项按钮>不要在电子邮件交付前)在C#。

We are writing a feature to send a reminder email to customers in x number of days and just wondered if it was possible to delay the sending of the emails similar to how you can in Outlook (New Mail > Options button > Do not deliver before) in C#.

有谁知道这样做的方法是什么?

Does anyone know of a way of doing this?

推荐答案

一种可能性是创建一个计划任务处理待处理的邮件运行的服务。你可能会存储待定邮件在SQL数据库。 (戴维详细介绍这一点)

One possibility is to create a service that runs on a scheduled task processing 'pending' mail. You might store the pending mail in a SQL Database. (Dave details this)

本文着眼promissing,如果你想避免一个'真正的'服务

This article looks promissing if you would like to avoid a 'real' service

HTTP://www.$c$cproject.com/KB/ ASPNET / ASPNETService.aspx