I need to know how can i query the sent email status.
Is there any special classes in Asp.net to achieve this feature?
If not do you know a way of doing that?
问题:
回答1:
If you're using the System.Net.Mail
namespace you can add a header to the email to request a read receipt:
message.Headers.Add("Disposition-Notification-To", "<address@yourdomain.com>");
However:
- lots of mail clients don't support them
- users might not have them enabled
- sending the read receipt is optional; they might simply say no
回答2:
There is no fool proof way to know whether an email has been read, since email is a "send and forget" type of service.
One thing that some mails do is to include a small (1x1 pixel is enough) unique image link in the email, that links back to the sender's web server. If the image is accessed, the email has been opened.
Note though that this doesn't always work either. In fact it's the reason that gmail and outlook sometimes require you to "opt in" to showing images in emails at all.
回答3:
As everyone say no sure way to know. Sendgrid email sending http://sendgrid.com has inbuilt support for adding 1px images as suggested. They also have an API that lets you test whether email has been opened or if included links have been clicked. The same caveats apply as above. However it at least lets you check where possible the status of a sent email. 97% of customers on one of our sites are exposing whether they have read an email.
You can see the email event API here http://docs.sendgrid.com/documentation/api/event-api/