在 Asp.Net 中群发 HTML 新闻通讯

发布于 2024-08-06 11:12:55 字数 256 浏览 10 评论 0原文

我正在开发一个网站,需要将 HTML 新闻通讯发送到邮件列表。

我已经构建了一个 html 框架,其中有“在浏览器中查看”和“取消订阅”链接(原因会有所不同)。在管理模块中,我发布 html 并上传 html 新闻通讯的图像。这是一个好方法吗?

我该如何向 XX.XXX 人发送电子邮件?我无法使用密件抄送,因为取消订阅链接会有所不同。所以我想我必须单独发送所有电子邮件。但代码应该是容错的,因此如果出现错误,只有一半人会收到新闻通讯。

此致, 拉塞

I'm developing a site where I need to send HTML newsletters to a mailing-list.

I have build a html frame where I have my "View in browser" and "Unsubscrib" links (which of cause will vary). In the admin module, I post html and uploads images for the html-newsletter. Is this a good way to do it?

How should I send the e-mails the XX.XXX persons? I can't use BCC because the unsubscribe link will vary. So I guess I have to sendt all the e-mails seperately. But the code shall be fault tollerant so only half get the newsletter if there is a error.

Best regards,
Lasse

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

城歌 2024-08-13 11:12:55

希望这些对您有所帮助:

  1. 使用 MailDefinition 作为模板引擎 http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.maildefinition.aspx 如果您的数量很大,您可能会考虑不使用 SMTP 作为传输协议,而是为您要发送的每封电子邮件生成文件,然后将它们直接放入 SMTP 服务器的“Drop”文件夹中。 Mirosoft SMTP Server 很容易实现这一点。

  2. 为每封电子邮件使用唯一的退回电子邮件地址(但包括对真实地址的回复,例如办公室(位于)yourdomain.com)。让这些退回电子邮件地址指向一个通用帐户,并在发送您的电子邮件后新闻通讯删除从数据库退回的所有地址

  3. 至于容错,我认为我不太明白为什么您只想要一半的新闻通讯?将捕获任何与服务器相关的问题并立即停止处理,并且任何与客户端相关的问题(客户端的电子邮件不起作用,请参阅 2.)将被跳过并记录(如果在处理过程中检测到)或稍后处理(如果稍后检测到)。 至于容错

  4. 根据您当地的法律检查选择加入/选择退出政策。

  5. 还可以看看将图像直接嵌入到 html 中(一个鲜为人知的事实是您可以将图像直接嵌入到 html 中),这通常会使电子邮件大小更大,但它会让 Outlook 直接显示这些图像,而无需访问您的服务器。当然,如果您想通过图像信标或类似的方式跟踪时事通讯,那么服务器图像就是您想要的。

  6. 当然,请检查所有常见电子邮件客户端的显示是否正确。据我所知,除非您发送纯文本,否则几乎不可能发送每个客户端都能正确显示的格式:)

Hope these are helpfull:

  1. Use MailDefinition as a templating engine http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.maildefinition.aspx If your numbers are large you may look into not using SMTP as a transport protocol, but rather generating files for each email you wish to send and then putting them directly into the "Drop" folder of your SMTP server. Mirosoft SMTP Server allows this quite easily.

  2. Use a unique bounce back email address for each email (but include a reply-to to a real address, such as office (at) yourdomain.com. Let those bounce back email addresses point to one common account and after sending your newsletter remove all addresses that bounced from your database.

  3. As for fault tolerance, I don't think I quite understand. Why would you only want half to ge the newsletter? I would catch any server related issues and stop the processing immediately, and any client related issues (client's email does not work, see 2.) are either skipped and logged (if detected during processing) or processed later (if detected later).

  4. Depending on your local laws check opt-in/opt-out policies.

  5. Also take a look at embedding images directly into the html (a not well known fact is that you can embed images directly into ) this will usually make email size larger but it will let Outlook display those images directly without going to your server. Of course if you want newsletter tracking via an image beacon or similar then server images are what you want.

  6. Of course check all common email clients for correct display. AFAIK it is almost impossible to send a format that each and every client will display correctly unless you send plain text :)

⊕婉儿 2024-08-13 11:12:55

是的,如果您想为每个客户提供唯一的取消订阅链接,您将需要一封一封地发送电子邮件。如果您在页面上放置一个文本框,人们可以通过输入电子邮件来取消订阅,那么您可以向所有人发送相同的电子邮件。

至于发送的电子邮件,您的想法是正确的。您需要在服务器上托管图像并从 html 中调用这些图像。

html 必须是 basic html 3.0 或类似的东西。这将确保大多数电子邮件客户端能够正确呈现您的电子邮件。

创建邮件列表时要格外小心,很容易被某些服务器(例如 google 或 hotmail)禁止。

yes you will need to send the emails one by one if you want a unique unsubscribe link for each client. you may send the same email to everyone if you put a textbox on the page where people can unsubscribe by typing in their emails.

as for the email being sent out, you have the right idea. you need to host the images on your server and call these from you html.

the html must be basic html 3.0 or something of the sort. this will ensure that most email clients will properly render your email.

be extra careful when making a mailing list, it can be very easy to get banned from certain servers such as google or hotmail.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文