troubleshooting Question

VB.NET generated email subject line contains tabs where spaces should be in Outlook 2007

Avatar of TheAnvilGroup
TheAnvilGroupFlag for United Kingdom of Great Britain and Northern Ireland asked on
Visual Basic.NET
6 Comments1 Solution679 ViewsLast Modified:
Dim mail As New MailMessage
mail.Subject = BuildSubject(newsData)
mail.Body = "<table>..data..</table>"
mail.IsHTML = True
'Some other code

Dim smtp As New SmtpClient(_sMTPServer)
smtp.Port = 25
smtp.Send(mail)

    Private Function BuildSubject(ByRef newsData As News) As String
        Dim subject As New StringBuilder

        subject.Append("ALERT - ")
        subject.Append(CStr(newsData.PassengerCount))
        subject.Append(" Traveller" & CStr(IIf(newsData.PassengerCount > 1, "s", "")))
        subject.Append(" present in ")
        subject.Append(newsData.CountryName)
        subject.Append(" - Incident level: " & newsData.IncidentLevel.ToString())
        subject.Append(" - Category: " & newsData.FullCategories)
        subject.Append(" - ")
        subject.Append(newsData.SummHeadline)
        subject.Append(" - ")
        subject.Append(newsData.SearchTypeID.ToString())

        Return subject.ToString
    End Function

When email is received in Outlook 2007 contains the following (note there is a tabl before 'strike' and before 'category'):
ALERT - 5 Travellers present in United Kingdom - Incident level: 2 -      Category: Rail Delays/Disruption - UK: Eurostar running 'normally' despite      strike - Proximity

Please help me in what is causing this and how to I get rid of this. Is this to do with Outlook, the email body text not having html tags or is this due to the colons in the subject line?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros