Hi,
Currently I used the DNN sendmail to send emails in my project, but it somehow saying this error: "An invalid character was found in the mail header: ','. ", Sometimes, it can work fine.
Here is my code:
Mail.SendMail(Host.HostEmail, onlineUser.DNNUser.Email, string.Empty, bccEmails, string.Empty, MailPriority.Normal, registrationEmailSubject, MailFormat.Html, Encoding.UTF8, registrationEmailBody, attachments, Host.SMTPServer, Host.SMTPAuthentication, Host.SMTPUsername, Host.SMTPPassword, Host.EnableSMTPSSL);
The email address and content didn't contain a ",".
Does anyone can help? Thanks in advance.