Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Create a MAPI message as per MIME content

102 views
Skip to first unread message

Amit

unread,
Nov 26, 2009, 8:02:23 AM11/26/09
to
Hi All,
I have a sample MIME from a message sent by 3rd party application
and i want to create same kind of message using MAPI.
The sample MIME looks like:

Date: Tue, 24 Nov 2009 18:36:42 +0530 (IST)
From: us...@xyz.com
To: us...@xyz.com
Message-ID: <841206628.141259068...@xyz.com>
Subject: Message Created
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_Part_2_515742560.1259068002050"
X-Originating-IP: [10.66.104.81]
X-Mailer: XYZ Client

------=_Part_2_515742560.1259068002050
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

The message is created here.....

------=_Part_2_515742560.1259068002050
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<h3>The message is created</h3>
------=_Part_2_515742560.1259068002050
Content-Type: xml/x-xyz-subtype; charset=utf-8
Content-Transfer-Encoding: 7bit

<Comp1 xmlns="urn:xyzMessage" version="0.1" action="new" >
<cal1 id="9da8b151-4b45-470e-93a0-a33abb0f9759"
email="us...@xyz.com" name="us...@xyz.com" />
<cal2 id="dd302022-9e9c-4001-9d9d-a1e1596daf11"
email="us...@xyz.com" name="user2" />
<gtech id="262" name="CalName" view="message" perm="rwidx" />
<desc></desc>
</Comp1>
------=_Part_2_515742560.1259068002050--


How can i do this? Any help or any pointer is highly appreciated.

Thanks and Regards.

Hans Schmidt

unread,
Nov 27, 2009, 2:56:32 AM11/27/09
to
Hi,

i don't know if it is the perfect way, but you can build your mail and
then
use IConverterSession::MapiToMimeStm to create a MIME Message.

http://msdn.microsoft.com/en-us/library/aa193047%28office.11%29.aspx


Greets Hans

Hans Schmidt

unread,
Nov 27, 2009, 3:00:18 AM11/27/09
to
Sorry, i forgot to mention that you can also use Redemption
http://www.dimastr.com/redemption/
There the MailItem Object or SafeMailItem have a SaveAs Method that
allows you to save as RFC822.

Greets Hans

On 27 Nov., 08:56, Hans Schmidt <suffpor...@googlemail.com> wrote:
> Hi,
>
> i don't know if it is the perfect way, but you can build your mail and
> then
> use IConverterSession::MapiToMimeStm to create a MIME Message.
>
> http://msdn.microsoft.com/en-us/library/aa193047%28office.11%29.aspx
>
> Greets Hans
>
> On 26 Nov., 14:02, Amit <ver_amit...@yahoo.com> wrote:
>
> > Hi All,
> >     I have a sample MIME from a message sent by 3rd party application
> > and i want to create same kind of message using MAPI.
> > The sample MIME looks like:
>
> > Date: Tue, 24 Nov 2009 18:36:42 +0530 (IST)
> > From: us...@xyz.com
> > To: us...@xyz.com

> > Message-ID: <841206628.141259068002052.JavaMail.r...@xyz.com>

Amit

unread,
Nov 30, 2009, 6:07:47 AM11/30/09
to
Dear Hans,
Many thanks for your reply. The answer which you have provided is
to convert the MAPI message to MIME but I need exact opposite to it. I
want to create a message and dispatch using extended MAPI whose MIME
should look like above mentioned MIME message at receiver's end.
In summary, when receiver gets this message and convert the received
message into MIME that should look like as above mentioned MIME
message.
How can i create such a message using extended MAPI in C++? Any guess?

Thanks and Regards.

Amit

unread,
Nov 30, 2009, 7:54:47 AM11/30/09
to
Thanks Hans again for your help. I found the way by attaching the
content and setting corresponding 'PR_ATTACH_MIME_TAG' property to
desired content type (e.g. xml/x-xyz-subtype).
Regards.

Dmitry Streblechenko

unread,
Nov 30, 2009, 9:04:15 PM11/30/09
to
I am not sure what yo uare after MIME -> IMessage -> MIME?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Amit" <ver_a...@yahoo.com> wrote in message
news:81a3e7f2-3943-44e1...@v15g2000prn.googlegroups.com...

Amit

unread,
Dec 14, 2009, 5:26:48 AM12/14/09
to
Sorry for being late in reply. The message which I need to create and
dispatch is supposed to be read by custom mail client and need to
perform some specific operations as per the content-type set by the
sender. My intention is to create a mail which has a HTML body and
another mime section which has this specific content-type (xml/x-xyz-
subtype) section. Is there any other way to create such message using
MAPI in C++ instead of creating an attachment?
Thanks.
0 new messages