I have this code here…
MailAddress from = new MailAddress("noreply@fakeemail.com", "IPC Orders");
MailAddress to = new MailAddress("email1@fakeemail.com.com");
MailMessage mail = new MailMessage(from, to);
mail.To.Add("email2@fakeemail.com");
mail.To.Add("email3@fakeemail.com");
Obviously this is not the full code, but when I try to send an email to multiple email address is doesnt send, if I comment out these two lines…
mail.To.Add("email2@fakeemail.com");
mail.To.Add("email3@fakeemail.com");
It works and will send it to the first email MailAddress to = new MailAddress("email1@fakeemail.com.com");
Whats wrong with my code
USE
AddressCollectionFOR ADDING MULTIPLETOADDRESSESLIKE
mail.To = new AddressCollection( “email2@fakeemail.com, email3@fakeemail.com“);