B
benji
Hi,
Working with VB.NET 2005. I've got a mailmessage object and I set it up so
that when the recipient replies, the reply address is a string of two
different email addresses together. I used a line like the following:
mymessage.Headers.Add(addressone + "," + addresstwo)
Everything worked as expected when running on framework 2.0. However, after
installing 2.0 SP1, the behavior broke. This header was stripped out of the
message. I ran under the debugger and confirmed that before the message was
passed to the smtp object for sending, there was the single header. After,
that header was gone, replaced by other headers as expected for properties
such as frmo and to which were set. What's going on? This happens in
framework 3.5 as well.
I would set the "ReplyTo" property of the message but you have to set it to
a "MailAddress" and it will only accept a single address. Trying to set it to
more than one, it simply trims after the first address in the string with no
warning (I believe I used to get an exception before SP1).
I see a few changes in the mail namespace with 2.0 SP1:
http://support.microsoft.com/kb/945757
So 2 questions:
1) is this a defect?
2) Can anyone share example code that would allow me to set a header such
that the "reply-to" would be a stringn of 2 email addresses, and would work
correctly running on 2.0 SP1 or 3.5?
3) Is anyone able to successfully add ANY custom headers to a mail message
after 2.0?
Thank you...
-Ben
Working with VB.NET 2005. I've got a mailmessage object and I set it up so
that when the recipient replies, the reply address is a string of two
different email addresses together. I used a line like the following:
mymessage.Headers.Add(addressone + "," + addresstwo)
Everything worked as expected when running on framework 2.0. However, after
installing 2.0 SP1, the behavior broke. This header was stripped out of the
message. I ran under the debugger and confirmed that before the message was
passed to the smtp object for sending, there was the single header. After,
that header was gone, replaced by other headers as expected for properties
such as frmo and to which were set. What's going on? This happens in
framework 3.5 as well.
I would set the "ReplyTo" property of the message but you have to set it to
a "MailAddress" and it will only accept a single address. Trying to set it to
more than one, it simply trims after the first address in the string with no
warning (I believe I used to get an exception before SP1).
I see a few changes in the mail namespace with 2.0 SP1:
http://support.microsoft.com/kb/945757
So 2 questions:
1) is this a defect?
2) Can anyone share example code that would allow me to set a header such
that the "reply-to" would be a stringn of 2 email addresses, and would work
correctly running on 2.0 SP1 or 3.5?
3) Is anyone able to successfully add ANY custom headers to a mail message
after 2.0?
Thank you...
-Ben