You might have problems with the Multipurpose Internet Mail Extension (MIME) file that is causing the QtmmSendMail API to return an error. You should check the MIME file to ensure that these problems are fixed.
See section 2.1 in RFC2822 (http://rfc.net/rfc2822.html) for more information about the end-of-header statement.