|
|
||||||
|
#1
|
|
|
|
|
Hi,
I want to know how to embed images into an email using C++. I am currently using CMIMEMessage and it looks like it can not be done using it.. my code is like this: sendMail(mailhost.smtp.com, "lewis", "lewis", "test", "test"); 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()); conn.Connect(mailHostConverted); CMimeMessage msg; msg.SetSender(mailFromConverted); msg.AddRecipient(mailToConverted); msg.SetPriority(ATL_MIME_HIGH_PRIORITY); msg.AddText(mailBodyConverted); msg.SetSubject(mailSubConverted); conn.SendMessage(msg); return status; } So the mail should look like: test [a jpeg here] sth like this.... please help thanks alot |
|
|
|
#2
|
|
|
|
|
Lewis Yeung <LewisYeung> wrote:
> I want to know how to embed images into an email using C++. I am > currently using CMIMEMessage and it looks like it can not be done > using it.. You need to generate a multipart MIME message, with the body in HTML format. Use your favorite email client to send yourself a message like this, then examine raw text to see what a multipart message looks like (in Outlook Express, select a message and hit Ctrl+F3). CMimeMessage supports multipart messages with AttachMessage and AttachRaw methods. |
|
|
| Similar Threads | |
| Made doc with "link to file" images, now I want to embed images. IÂīm writing a manual with "link to file" images, so I can edit them and keep file light. But I want to save a final version with images embedded, so I can e-mail or put on... |
|
| Embed images in email powershell code sample Hi there, I have been searching for some sample code for "embedding images in html email from powershell". I can get images to link from a URL but want to embed them as a... |
|
| VBscript embed images in HTML email body Hi Im sending email's using the "script task" of SQL Server 2005 Integraton Services. The email body is an HTML string . Now i want to embed image in that body.I tried to do... |
|
| how do i embed images in an email Hi, How do I embed an image into a htm email stationery? Cheers |
|
| How to embed images in html email I have a vb.net program that sends out html emails via smtp on a windows 2003 server. Question I have is how do you embed images in an html email message? You get to... |
|
|
All times are GMT. The time now is 02:34 AM. | Privacy Policy
|