My HTML Email is empty. What is wrong?

Question:

What is wrong with this code?

Chilkat.Email emailMessage= new Email();
emailMessage.Subject = mSubject;
emailMessage.SetHtmlBody( mHtmlBody);
emailMessage.AddTo("", mTo);
emailMessage.FromAddress = mFrom;
emailMessage.FromName = "Do not respond to this email";
            
Chilkat.MailMan mailManager = new MailMan();
mailManager.UnlockComponent("UnlockCode");
 
mailManager.SmtpHost = "mail.mycompany.com";
mailManager.SmtpUsername = "MyUsername";
mailManager.SmtpPassword = "MyPassword";
mailManager.SmtpAuthMethod = "LOGIN";
 
if (mailManager.SendEmail(emailMessage))
...

Answer:

The component must be unlocked before using the methods in Chilkat.Email.

Move the call to mailman.UnlockComponent to the beginning of the program.