本文介绍了Email Solutions的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是错误的论坛,但我必须从某个地方开始。

This is probably the wrong forum but I got to start somewhere.

我们有一个原始的内部系统,允许不同的应用程序/服务发送各种电子邮件。

We have a crude in-house system for allowing disparate apps/services to send various kinds of emails.

其中一些是Web服务,一些是桌面应用程序,一些是Web应用程序,一些是"批处理"应用程序。 (控制台)应用程序。

Some of these are web services, some are desktop apps, some are web apps and some are "batch" (console) apps.

有许多不同类型的电子邮件反映了商业活动(大学)中固有的各种事件。

There are a host of different kinds of emails that reflect various events inherent in the business activities (university).

大多数其中使用某种形式的价值替代加上存储在SQL DB中的预定义HTML,但没有真正的可靠性,而且大量的电子邮件都是以不同的方式完成的。

Most of these use some form of value substitution coupled with predefined HTML stored in a SQL DB, but there's no real solidity and numerous emails are done differently.

而不是重新设计这个并重新发明轮子,有没有这样的产品?

Rather than redesign this and reinvent wheels, is there not a product that exists for this?

这就是我们要寻求的:


  1. 以某种方式运行可以从.Net等调用的REST服务
  2. 易于编辑和保存电子邮件模板
  3. 处理模板并进行所需值替换的简洁方法。
  4. 避免T4模板(因为如果更新T4文本需要重新生成这些模板)

当然我可以设计一些东西来做到这一点但肯定有服务/产品甚至是开源产品那已经这样做了吗?

Of course I could design something to do this but surely there are services/products or even open source offerings that do this already?

当前的设计(非常混乱)使用了一种形式的nam e / value字典由客户端传递(使用常用方法GenAndSendEmail()),然后在引擎盖下用于获取模板并执行值替换等等。

The current design (which is pretty messy) uses a form of name/value dictionary which is passed by a client (using a common method GenAndSendEmail()) and then under the hood used to grab the template and perform value substitution and so on.

Thx

推荐答案

我们创建类的任何方式( C#)用于发送电子邮件。在用户选择从数据库推送到Kendo小部件的模板之后,允许用户选择模板并通过基诺编辑器(具有模板)下拉小部件插入
这将被传递给控制器然后调用存储库中的方法,该方法通过类和实体框架使用构建器模式将所有内容放在一起,然后将信息传递到电子邮件库。

Any ways we created a class (C#) for sending email messages. After the user selected a template pushed from the database to the Kendo widget which allows the user to select a template and insert via a drop down widget in the keno editor (which has the templates) this would be passed to a controller which then calls a method in a repository that uses a builder pattern via classes and entity framework to put everything together which then passes the information to the email library.

这是一个WebApi解决方案使用restful服务。

This is all is a WebApi solution using restful services.

抱歉,我没有一个简单的例子,因为上面的内容全部包含在一个解决方案中的两个C#类库中,另一个C#类在一个团队解决方案中加入了第一个解决方案中的jQuery代码。

Sorry I don't have a simple example as the above is all wrapped up into two class C# libraries in a solution, another C# class in a team solution coupled with the jQuery code in the first solution.

我们在三个企业解决方案中完成此任务的方式,从未在生产中遇到过问题。

Any ways we have done this in three enterprise solutions and never had issues in production.


这篇关于Email Solutions的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 21:07