Attachments using COM convert email to text/plain

Discussion for developers using MailEnable.
Post Reply
mouser
Posts: 9
Joined: Mon May 15, 2006 4:03 pm

Attachments using COM convert email to text/plain

Post by mouser »

Even if I specify the Content-type as text/html, the email arrives in Outlook with HTML tags in text/plain (snip below). Any ideas how I can get attachments with HTML emails would be GREAT!

...

----=_NextPart_000_000B_09EB2381.CE9040AD
Content-type: text/plain; charset="US-ASCII"
Content-transfer-encoding: 7bit

<html><HEAD><LINK href="http://www.xe.css" rel="stylesheet" type="text/css"></HEAD><BODY>Dear XE,<BR><BR>this is the text for the email!</BODY></html>

----=_NextPart_000_000B_09EB2381.CE9040AD
Content-Type: application/octet-stream; name="CMS.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="CMS.jpg"

/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3

...
ME Ent. v2.52
Win2k3 IIS6
.NET v2

mouser
Posts: 9
Joined: Mon May 15, 2006 4:03 pm

Post by mouser »

Reply (working) from Peter Fregon, MailEnable Support (thanks Peter ;-)...

For the ContentType property, just use "text/html;". Don’t add the charset bit as this will cause the problem you are experiencing.
ME Ent. v2.52
Win2k3 IIS6
.NET v2

Nalfaren
Posts: 11
Joined: Wed Apr 09, 2008 3:03 pm

Post by Nalfaren »

I have the same issue, and i already figured out the charset fix.
But how can i specify it as utf-8, my message is all scrambled
and can't handle international chars and such now.

My html message starts with:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />



the active server page accessing and sending the mail is saved as utf-8

and the asp file has:
codepage=65001
Response.CharSet = "UTF-8"


I can send it correctly with:
.ContentType = "text/html; charset=UTF-8;"

but then mail with attachments will be broken and sent as text/plain.

argh.

Nalfaren
Posts: 11
Joined: Wed Apr 09, 2008 3:03 pm

Post by Nalfaren »

Has someone a solution?

Post Reply