如何创建一个电子邮件发送服务? [英] How do I create an email-sending service?

查看:160
本文介绍了如何创建一个电子邮件发送服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经踢围绕这个想法了一会儿,想读你的看法。

I've been kicking around this idea for a while and would like to read your thoughts.

我想创建一个.NET服务来发送和跟踪电子邮件。

I'd like to create a .NET service to send and track email messages.

我粗略的想法:

  1. 在各种应用中,序列化.NET的电子邮件(System.Net.Mail.MailMessage)对象的实例,并把它们放入一个数据库或文件系统队列

  1. Within various applications, serialize instances of .NET email (System.Net.Mail.MailMessage) objects and put them into a database or file system queue

邮件服务/进程将轮询队列,并发送电子邮件

The mail service/process polls the queue and sends the emails

强制订阅/退订名单/规则

Enforce subscribe/unsubscribe lists/rules

轨道打开,反弹,外的自动答复,等等。

Track opens, bounces, out-of-office auto-replies, etc.

报告的状态回到原来的应用程序

Report statuses back to the original applications

有没有人有意见如何,我应该开始还是什么问题,我可以有?是否有现成的,现成的软件/服务,我应该看?

Does anyone have advice for how I should get started or what issues I may have? Is there off-the-shelf software/service I should look at?

推荐答案

您将需要学习一切你可以对SMTP协议,即使你使用的是更高级别的工具,做大部分的工作适合你。在我自己的经验与加工出站和入站邮件与.NET,我并没有真正了解,直到我学会了telnet连接到SMTP服务器的端口25和发送电子邮件的连接通过发出命令自己。

You will need to learn everything you can about the SMTP protocol, even if you are using higher level tools that do most of the work for you. In my own experience with processing outbound and inbound emails with .NET, I didn't really "get it" until I learned to telnet to port 25 of an SMTP server and send en email by issuing the commands myself.

如果您正在发送大量的电子邮件了,并且你需要监控的NDR(无本金交割报告),则必须设置SMTP信封发件人地址添加到自己的服务器,并解析所有这些邮件时,他们进来图发生了什么。

If you are sending lots of emails out and you need to monitor NDRs (non-deliverable reports), you will have to set the SMTP envelope sender address to your own server and parse all of those emails when they come in to figure out what happened.

在System.Net邮件类不允许您设置MAIL FROM与MTA的谈话没有在电子邮件标题同样的事情还设置发件人地址,所以你需要使用第三方库如 aspNetEmail 如果你需要这些地址是不同的。

The System.Net email classes don't allow you to set the MAIL FROM in the conversation with the MTA without also setting the From address in the email header to the same thing, so you will need to use a 3rd party library like aspNetEmail if you need those addresses to be different.

ListNanny 是另一种工具是有用的解析的NDR,除其它功能。

ListNanny is another tool that is helpful to parse NDRs, among other functions.

我不知道序列化的MailMessage对象。我认为这将是更简单,只是存储不同的数据元素本身,然后实例MailMessage对象时,你需要他们。

I'm not sure about serializing the MailMessage objects. I think it would be simpler to just store the separate data elements themselves and then instantiate MailMessage objects when you need them.

这篇关于如何创建一个电子邮件发送服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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