This is a sequel to my first posting on this problem above.
I have probed TSubType more closely and there are things I now do not understand arising.
Consider the following snippets of code:
Code:
Taken from Help for TSubType:
TSubType = (mtPlain, mtEnriched, mtSgml, mtTabSeperated, mtHtml);
which I presume to be an enum structure.
Taken from my email program:
...
//check for intended email type and set SubType accordingly
//
if(cIsHTML=='n')
{//msg is Text
NMSMTP1->SubType=mtPlain; //assign text mode
//look
fprintf (fpPEPMMailSLog,"Info; Set plain text email. Sub %d %d\n",mtPlain,NMSMTP1->SubType);
}
//
if(cIsHTML=='y')
{//msg is HTML
NMSMTP1->SubType=mtHtml; //assign HTML mode
//look
fprintf (fpPEPMMailSLog,"Info; Set HTML email. Sub %d %d\n",mtHtml,NMSMTP1->SubType);
}
...
This produces as output:
when run with a plain text email to send
Info; Set plain text email. Sub 0 845836288
and
when run with an HTML email to send
Info; Set HTML text email. Sub 4 9523716
It can be checked with the SubType structure, above, that for both outputs, the first digit, 0 for the plain text case and 4 for the HTML case are correct. However, I have my doubts about the second digits. Why? I would understand NMSMTP1->SubType to be an integer typed component of the structure (NMSMTP) NMSMTP1, hence following an assignment I would expect its output value to be the same as the right-value, 0 or 4, in this case. It appears NOT to be. (However, I may have misinterpreted the code and would like to be corrected if so.)
Suppose I am right, i.e., the values assigned to NMSMTP1->SubType ARE as shown in the two cases, then the NMSMTP component would appear to have no hope of correctly responding to sending the email text with the intended browser mode attached. I suspect, in this case, that where the value assigned to NMSMTP1->SubType is not in the permitted range of [0 - 5] then a default of 0 is taken. In this case, it won't matter what you intend, you will always see Plain text in the browser on receiving the email, which is what I always find.
Could someone out there please repeat my test in C++ and possibly Delphi too?
I would welcome any feedback or comment, and a work-around to the problem, if that's at all possible.
Thanks for your patience in getting this far!
PE.