I have it this a try/catch block, but it is not throwing any exceptions.
I can hit a breakpoint up to
email.Subject = _subject;
but after that it will not break, unless in debug mode..
public void Send()
{
MailMessage email = new MailMessage();
email.From = new MailAddress(From);
foreach (string receiver in Receivers)
{
email.To.Add(new MailAddress(receiver));
}
email.Subject = _subject;
email.Body = Body;
var client = Client;
client.Send(email);
}
I'm out of ideas, I appreciate any help.
EDIT - I'm not concerned about the breakpoints. I just want to figure out why this code is not working.
SOLVED
The receiver address was being changed between debug and release modes.
The address in release mode did not accept emails from addresses that are not authenticated.