Answers
Mar 04, 2009 - 08:05 PM
It would make it much easier to assist you.
Thanks!
Ric
Mar 05, 2009 - 12:52 AM
I was just a bit surprised, since I didn't know there were characters that could trigger this for an email subject.
Mar 05, 2009 - 03:24 AM
Let's say you're getting the subject line from the database and you run into a NULL value. Well, if they're not converted to string.Empty or "" then you could potentially see the error you're describing.
Here's another scenario - your database holds something like 'Dwayne "The Rock" Johnson' for the value. Completely valid data, but those additional quotes within the value would inadvertently terminate the current string right after 'Dwayne ' and starting with 'The' you would have an unrecognized value.
I'm sure there are a few other reasons why this could happen, but those are a couple I've run across myself - especially with "blind" systems where people could register for a forum, or a subscription-based site.
Sadly, it's hard to prepare for the varying levels of stoooopid that the ordinary user can introduce into a perfectly good system. :)
I hope you're doing well - it's been quite a while since I've had time to spend on Quomon, but I'm glad to see it's thriving!
Let me know if I can help you out any further...I'd be happy to!
Take care,
Ric
Mar 05, 2009 - 08:53 AM
I figured out what the issue was, by doing what they recommend here: http://blog.dotsmart.net/2008/02/15/s...
message.Subject = subject.Replace('\r', ' ').Replace('\n', ' ');
I don't know how that carriage-return got in the subject, but this solved it :)
I'll give you some points for getting me in the right direction and pointing out some other things that i wasn't taking into account either.
Add New Comment