Does anyone see something wrong with this code:
MailMessage msg = new MailMessage(); msg.From = new MailAddress(WebConfigurationManager.AppSettings.Get("ReservationsFrom")); msg.ReplyTo = new MailAddress(myRes.Email); msg.To.Add(new MailAddress(WebConfigurationManager.AppSettings.Get("ReservationsTo"))); msg.CC.Add(new MailAddress(WebConfigurationManager.AppSettings.Get("ReservationsBcc")));
Try as best I could, I can get the "To" and "ReplyTo" addresses to work, CC and BCC will never receive mail, even if I hard-code the addresses.
Did I miss something obvious here?
Edit: And yes, I'm sure that I am taking the correct addresses from web.config - as I said, even if I hardcode the static address, BCC and CC never received email.
source share