T
travispennington
To anyone that can assist me: I deeply appreciate your help!!
I am developing an application with an outside vendor. The vendor has
a very odd requirement. They need custom X-Headers added to an email
received by their system. That's not the odd part. The oddity is
they want to have a single X-Header containing multiple keys and
values that are delimited by a carriage return, line feed and tab.
The vendor claims other customers have successfully met this
requirement using Lotus Notes.
Here's a snippet of code that attempts this requirement:
Dim objMail As New System.Web.Mail.MailMessage
objMail.To = strToAddress
objMail.From = strFromAddress
objMail.Subject = "test"
System.Web.Mail.SmtpMail.SmtpServer = "smtp_svr_1"
objMail.Headers.Add("X-Custom-Header", "key1: value1" & vbCrLf & vbTab
& "key2: value2")
When the email is received, this is where I fail the requirement. My
header looks like this:
X-Custom-Header: key1: value1 key2: value2
The vendor says that my header should look like this:
X-Custom-Header: key1: value1
key2: value2
In other words, they say the vbCrLf should wrap the text inside the
header to a new line and then tab once. Although I have attempted
numerous ways to insert the carriage return line feed, it always
renders on a single line in the header. I've also tried using
Environment.NewLine() with no success.
Is this even possible? My gut tells me no, but I'm hoping someone out
there will be able to say "yes it's possible" and show me how.
Thank you kindly for your time,
Travis
I am developing an application with an outside vendor. The vendor has
a very odd requirement. They need custom X-Headers added to an email
received by their system. That's not the odd part. The oddity is
they want to have a single X-Header containing multiple keys and
values that are delimited by a carriage return, line feed and tab.
The vendor claims other customers have successfully met this
requirement using Lotus Notes.
Here's a snippet of code that attempts this requirement:
Dim objMail As New System.Web.Mail.MailMessage
objMail.To = strToAddress
objMail.From = strFromAddress
objMail.Subject = "test"
System.Web.Mail.SmtpMail.SmtpServer = "smtp_svr_1"
objMail.Headers.Add("X-Custom-Header", "key1: value1" & vbCrLf & vbTab
& "key2: value2")
When the email is received, this is where I fail the requirement. My
header looks like this:
X-Custom-Header: key1: value1 key2: value2
The vendor says that my header should look like this:
X-Custom-Header: key1: value1
key2: value2
In other words, they say the vbCrLf should wrap the text inside the
header to a new line and then tab once. Although I have attempted
numerous ways to insert the carriage return line feed, it always
renders on a single line in the header. I've also tried using
Environment.NewLine() with no success.
Is this even possible? My gut tells me no, but I'm hoping someone out
there will be able to say "yes it's possible" and show me how.
Thank you kindly for your time,
Travis