Is .NET MailMessage class injection-safe?

I wonder if MailMessage class is protected from e-mail injection. For example, should I check values before passing them to its constructor:

MailMessage message = new MailMessage(fromTextBox.Text, toTextBox.Text);


The MailAddress class checks its addresses against the full BNF grammar from RFC822. (See MailBnfHelper).

There is no risk of injection when using MailMessages. (Except HTML injection in your own content)

Need Your Help

Timezone Conversion moment js

javascript momentjs

I have a requirement to convert (UTC/GMT) time to local time based on timezone string provided by user using moment js.

Django: information leakage problem when using @login_required and setting LOGIN_URL

python django authentication django-urls

I found a form of information leakage when using the @login_required decorator and setting the LOGIN_URL variable.