How can I implement VERP (Variable envelope return path) in .NET?

回眸只為那壹抹淺笑 提交于 2020-03-24 03:04:40

问题


I want to implamant this bounce handling protocol in .NET but after I researched abit I found out that the basic classes that come with .NET don't support envelope assignment required by VERP

Is there a work around or another method?


回答1:


You can definitely implement VERP using System.Net.Mail, just generate a unique from address for each to address, then when the message bounces, your catch-all email account will receive it and you will know what to address to invalidate.

Here's a step-by-step example:

  1. You will send an email to someuser@somedomain.com.
  2. You generate a random unique from address from a GUID, for example: F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4-customers@mydomain.com
  3. You keep a dictionary or database table that associates the from address above with the to address.
  4. You receive a bounce email to a catch-all inbox where the recepient is F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4-customers@mydomain.com, therefore...
  5. You invalidate someuser@somedomain.com in your DB.


来源:https://stackoverflow.com/questions/10050779/how-can-i-implement-verp-variable-envelope-return-path-in-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!