Skip to content

Commit 5774b41

Browse files
Mail adress comma seperated fixed #98
1 parent f51608b commit 5774b41

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

Controllers/EventRegistrationController.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,6 +1261,16 @@ private void SendEmailNotification(string notificationType, string email, string
12611261

12621262
var es = new EmailService();
12631263

1264+
List<string> ccMails = new List<string>();
1265+
if(!String.IsNullOrEmpty(e.EmailCC))
1266+
ccMails.AddRange(e.EmailCC.Split(',').ToList());
1267+
1268+
1269+
List<string> bccMails = new List<string>();
1270+
bccMails.Add(ConfigurationManager.AppSettings["SystemEmail"]);
1271+
if(!String.IsNullOrEmpty(e.EmailBCC))
1272+
bccMails.AddRange(e.EmailBCC.Split(',').ToList());
1273+
12641274
// If no explicit Reply to mail is set use the SystemEmail
12651275
string replyTo = "";
12661276
if (String.IsNullOrEmpty(e.EmailReply))
@@ -1276,8 +1286,8 @@ private void SendEmailNotification(string notificationType, string email, string
12761286
subject,
12771287
body,
12781288
new List<string> { email }, // to
1279-
new List<string> { e.EmailCC }, // CC
1280-
new List<string> { ConfigurationManager.AppSettings["SystemEmail"] , e.EmailBCC}, // Allways send BCC to SystemEmail + additional set
1289+
ccMails, // CC
1290+
bccMails, // Allways send BCC to SystemEmail + additional set
12811291
new List<string> { replyTo }
12821292
);
12831293
}

0 commit comments

Comments
 (0)