I need to send an email through the smtp server. The hard part about this is that I need to embed a jpeg signature at the end of the mail. But this signature is not an attachment. any ideas on how to do that? I am using CMIMEMessage and it looks like it can not do so...

my code is like this:

static STATUS_T sendMail(string mailHost, string mailTo, string mailFrom, string mailSub, string mailBody)
 CSMTPConnection conn;
 CA2CT mailHostConverted(mailHost.c_str());
 CA2CT mailToConverted(mailTo.c_str());
 CA2CT mailFromConverted(mailFrom.c_str());
 CA2CT mailSubConverted(mailSub.c_str());
 CA2CT mailBodyConverted(mailBody.c_str());
 CMimeMessage msg;
 return status;

So the mail should look like:

hi ............


sth like this.... please help thanks

Maybe the documentation of the external library you are currently using will have some pointers on how u can go about doing this.

Also without the complete code it becomes difficult to think of a solution.

HOpe it helped,

Does this even compile?

> return status;
I see no status declared anywhere.

> CA2CT mailHostConverted(mailHost.c_str());
This looks like it's stuck half way between a function prototype and a function call.

> conn.Connect(mailHostConverted);
I imagine this returns a status, why not test that to see whether the connect failed or not.

This article has been dead for over six months. Start a new discussion instead.