BehroozBahrameh / elmah

Automatically exported from code.google.com/p/elmah
Apache License 2.0
0 stars 0 forks source link

ELMAH not logging System.FormatException thrown by System.Net.Mail.MailMessage.To.Add() #403

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have an MVC 3 web application with an action method that sends an email. When 
the action method calls MailMessage.To.Add with multiple email addresses 
separated by semicolons (;), .NET throws a System.FormatException: “An 
invalid character was found in the mail header: ';'.”

ELMAH did not log the error thrown. I have tried this many times and it was 
never logged. Other exceptions get logged as expected, but this one is not.

I am using version 1.2.2 of ELMAH core and logging errors to the database.

Please help.

Thanks

Original issue reported on code.google.com by mohammed...@gmail.com on 17 Dec 2015 at 2:58