I have a class that sends an Email (MailMessage) but I get the following error:
“The specified string is not in the form required for a subject.”
Is there a handy dandy method to sanitize the strings or do I have to write my own?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I haven’t personally tried it, but according to this, you only need:
or something equivalent.
Internally, the
MailMessageclass will check the subject with:So the only limitation (for now) happens to be the presence of
CRorLF.