S
Scott Townsend
I'm trying to get a Delivery Receipt from sending a message using the
System.Net.Mail.SMTPClient Class
There seems to be a few ways to do it. You can set the
DeliveryNotificationOptions, or add Headers.
I've tried the following with varying results.
eMail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnSuccess
eMail.Headers.Add("Disposition-Notification-To", """" & sEmail_Sender_Name &
""" <" & sEmail_From & ">")
eMail.Headers.Add("Return-Receipt-To", """" & sEmail_Sender_Name & """ <" &
sEmail_From & ">")
I cannot seem to get a receipt for HTML Messages that I send to my Yahoo
Account. The Messages get through fine. I can see the headers and they
look fine too. If I send the message to my local Exchange Server, the
receipts work great.
If I just use the .body to send a Text email, I am able to get a Delivery
Receipt for the Text Message.
Here is how I've Formatted the HTML Message.
Dim htmlType As System.Net.Mime.ContentType = New
System.Net.Mime.ContentType("text/html")
eMail.AlternateViews.Add(AlternateView.CreateAlternateViewFromString(bcEmail_HTML_Body,
htmlType))
Any Suggestions?
Thanks,
Scott<-
System.Net.Mail.SMTPClient Class
There seems to be a few ways to do it. You can set the
DeliveryNotificationOptions, or add Headers.
I've tried the following with varying results.
eMail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnSuccess
eMail.Headers.Add("Disposition-Notification-To", """" & sEmail_Sender_Name &
""" <" & sEmail_From & ">")
eMail.Headers.Add("Return-Receipt-To", """" & sEmail_Sender_Name & """ <" &
sEmail_From & ">")
I cannot seem to get a receipt for HTML Messages that I send to my Yahoo
Account. The Messages get through fine. I can see the headers and they
look fine too. If I send the message to my local Exchange Server, the
receipts work great.
If I just use the .body to send a Text email, I am able to get a Delivery
Receipt for the Text Message.
Here is how I've Formatted the HTML Message.
Dim htmlType As System.Net.Mime.ContentType = New
System.Net.Mime.ContentType("text/html")
eMail.AlternateViews.Add(AlternateView.CreateAlternateViewFromString(bcEmail_HTML_Body,
htmlType))
Any Suggestions?
Thanks,
Scott<-