Dmitry...still the same error; Here is the code.
SmtpClient emailClient = new SmtpClient("-", -);
{
MailMessage message = new MailMessage(template.TemplateFrom, template.TemplateReplyTo);
message.IsBodyHtml = true;
message.Subject = resolver.ResolveMacros(template.TemplateSubject);
message.Body = resolver.ResolveMacros(template.TemplateText);
foreach (var individualEmail in template.TemplateCc.Split(';'))
{
message.CC.Add(individualEmail);
}
foreach (var individualEmail in template.TemplateBcc.Split(';'))
{
message.Bcc.Add(individualEmail);
}
if (attachment != null)
{
message.Attachments.Add(attachment);
}
emailClient.Credentials = new NetworkCredential("-", "-");
emailClient.Send(message);
}
Then here is the error, "An invalid character was found in the mail header: ';'."