Evidently the SmtpMail class doesn't throw an exception when the SMTP server
returns an error? It just lets you happily think the email was sent when
actually it was rejected by the SMTP server. I found this out by having my
app connect to DevNull's Dummy SMTP server. Seems I was sending just the
@domain part of the "FROM" address. Correcting that got my emails going.
Now, how do I get the From to display a friendly name instead of my email
address? I tried several variations of setting MailMessage.From="My Program
<em***@domain.com>". But everything I tried got rejected by the SMTP server
unless I only used the email address itself. I'm thinking I need to add the
"From: My Program" and "Reply-To: em***@address.com" headers to the email
but I'm not sure how to do that.
Appreciate any help.
Thanks.