Multi-part messages with CDOSYS

Multi-part messages with CDOSYS

am 30.08.2007 16:48:48 von Antonio

Hello,

I'm migrating from Dimac Jmail to Microsoft CDOSYS for an ASP
application, and I'm in stuck with a multipart message wich sends an e-
card.

Here it is part of the code with Jmail:

============================================================ ==================
msg=""
msg=msg & "This is a multi-part message in MIME format." & vbcrlf
msg=msg & "" & vbcrlf
msg=msg & "------=_NextPart_000_009F_01BE697E.A2223860" & vbcrlf
msg=msg & "Content-Type: multipart/alternative;" & vbcrlf & vbtab
msg=msg & " boundary=" & chr(34) & "----
=_NextPart_001_00A0_01BE697E.A2223860" & chr(34) & vbcrlf
msg=msg & "" & vbcrlf
msg=msg & "" & vbcrlf
msg=msg & "------=_NextPart_001_00A0_01BE697E.A2223860" & vbcrlf
msg=msg & "Content-Type: text/plain;" & vbcrlf & vbtab
msg=msg & "charset=" & chr(34) & "iso-8859-1" & chr(34) & vbcrlf
msg=msg & "Content-Transfer-Encoding: quoted-printable" & vbcrlf
msg=msg & "" & vbcrlf

..... (All the HTML part)

jmail.ContentType="multipart/related;" & vbcrlf & vbtab & "type=" &
chr(34) & "multipart/alternative" & chr(34) & ";" & vbcrlf & vbtab &
"boundary=" & chr(34) & "----=_NextPart_000_009F_01BE697E.A2223860" &
chr(34)

NextPart = "------=_NextPart_001_00A0_01BE697E.A2223860--" & vbcrlf &
vbcrlf
NextPart = NextPart & "------=_NextPart_000_009F_01BE697E.A2223860" &
vbcrlf
NextPart = NextPart & "Content-Type: image/jpeg" & vbcrlf
NextPart = NextPart & "Content-Transfer-Encoding: base64" & vbcrlf
NextPart = NextPart & "Content-ID:
<009301be697ea209ce601400a8c0@francesco>" & vbcrlf & vbcrlf

msg = msg & NextPart & vbcrlf & TMPstrB641 & vbcrlf & vbcrlf

NextPart = "------=_NextPart_000_009F_01BE697E.A2223860" & vbcrlf
NextPart = NextPart & "Content-Type: image/jpeg" & vbcrlf
NextPart = NextPart & "Content-Transfer-Encoding: base64" & vbcrlf
NextPart = NextPart & "Content-ID:
<009501be697ea209ce601400a8c0@francesco>" & vbcrlf & vbcrlf

msg = msg & NextPart & vbcrlf & TMPstrB642 & vbcrlf & vbcrlf

NextPart2 = "------=_NextPart_000_009F_01BE697E.A2223860--" & vbcrlf

msg = msg & NextPart2 & vbcrlf
jmail.body=msg
.....
============================================================ ===========

Now I have to change jmail with CDOSYS but I don't know how. I can't
find anything about CDOSYS and multipart messages.

Can you help me?

Thank you,
Antonio