I'm converting EML file to MAPI Message -it's ok,
But when I try to convert MAPI Message to EML file I have following problem... The body between original EML file and converted EML file is different!!!
I don't understand what happening... This is my short code...
HRESULT ConvertMimeToMapi(LPMESSAGE lpMessage)
{
pConverterSession = CoCreateInstanse(....)
hr = pConverterSession_->SetEncoding(IET_QP);
hr = pConverterSession_->SetSaveFormat(SAVE_RFC822);
hr = pConverterSession_->MIMEToMAPI(pMimeStream, lpMessage , NULL, CCSF_SMTP | CCSF_INCLUDE_BCC);
}
// Transform EML to MSG
HRESULT ConvertMapiToMime(LPMESSAGE lpMessage)
{
hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream);
pConverterSession = CoCreateInstanse(....)
hr = pConverterSession_->SetEncoding(IET_QP);
hr = pConverterSession_->SetSaveFormat(SAVE_RFC822);
hr = pConverterSession_->MAPIToMIMEStm(lpMessage,
pStream,
CCSF_SMTP |
CCSF_INCLUDE_BCC);
hr = pStream->Commit(0);
}
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
<Arthur Romanoff> wrote in message news:20085210...@yandex.ru...
"Dmitry Streblechenko" <dmi...@dimastr.com> wrote in message
news:OXR3WkHr...@TK2MSFTNGP03.phx.gbl...
This is part of my code
HRESULT EmlToMsgConvertor::ConvertMimeToMapi(IUnknown* pStream, LPMESSAGE
lpMessage)
{
USES_CONVERSION;
HRESULT hr = S_OK;
CComPtr<IStream> pMimeStream;
hr = pStream->QueryInterface(IID_IStream, (void**)&pMimeStream);
if (FAILED(hr))
{
throw _com_error(hr);
}
/* if (SUCCEEDED(hr))
{
hr = pConverterSession_->SetEncoding(IET_UNKNOWN);
}*/
if (SUCCEEDED(hr))
{
hr = pConverterSession_->SetSaveFormat(SAVE_RFC822);
}
if (SUCCEEDED(hr))
{
hr = pConverterSession_->MIMEToMAPI(pMimeStream, lpMessage , NULL, 0);
}
return hr;
}
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Web Service and MAPI" <WebServi...@discussions.microsoft.com> wrote
in message news:AA889D42-E50D-4C11...@microsoft.com...
Message-ID: <16159836.1075855377439.JavaMail.evans@thyme>
Date: Fri, 7 Dec 2001 10:06:42 -0800 (PST)
From: heather...@enron.com
To: k..allen@enron.com
Subject: RE: West Position
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-From: Dunton, Heather </O=ENRON/OU=NA/CN=RECIPIENTS/CN=HDUNTON>
X-To: Allen, Phillip K. </O=ENRON/OU=NA/CN=RECIPIENTS/CN=Pallen>
X-cc:
X-bcc:
X-Folder: \Phillip_Allen_Jan2002_1\Allen, Phillip K.\Inbox
X-Origin: Allen-P
X-FileName: pallen (Non-Privileged).pst
Please let me know if you still need Curve Shift.
Thanks,
Heather
-----Original Message-----
From: Allen, Phillip K.
Sent: Friday, December 07, 2001 5:14 AM
To: Dunton, Heather
Subject: RE: West Position
Heather,
Did you attach the file to this email?
-----Original Message-----
From: Dunton, Heather
Sent: Wednesday, December 05, 2001 1:43 PM
To: Allen, Phillip K.; Belden, Tim
Subject: FW: West Position
Attached is the Delta position for 1/16, 1/30, 6/19, 7/13, 9/21
When I converted eml to msg file I have the following problem. Some parts of email I see in body. For Example.
Message in Body:
Content-Transfer-Encoding: 7bit
Thanks,
Heather
-----Original Message-----
From: Allen, Phillip K.
Sent: Friday, December 07, 2001 5:14 AM
To: Dunton, Heather
Subject: RE: West Position
Heather,
Did you attach the file to this email?
-----Original Message-----
From: Dunton, Heather
Sent: Wednesday, December 05, 2001 1:43 PM
To: Allen, Phillip K.; Belden, Tim
Subject: FW: West Position
Attached is the Delta position for 1/16, 1/30, 6/19, 7/13, 9/21
The string "Please let me know if you still need Curve Shift." is missing!!! What is problem? I don't know.......
Parts of my code is:
if (SUCCEEDED(hr))
{
hr = ConverterSession_->SetEncoding(IET_QP);
}
if (SUCCEEDED(hr))
{
hr = pConverterSession_->SetSaveFormat(SAVE_RFC822);
}
if (SUCCEEDED(hr))
{
Heather,
Message in Body:
Content-Transfer-Encoding: 7bit
Heather,
if (SUCCEEDED(hr))
{
hr = pConverterSession_->SetSaveFormat(SAVE_RFC822);
}
if (SUCCEEDED(hr))
{
hr = pConverterSession_->MIMEToMAPI(pMimeStream, lpMessage , NULL,
CCSF_SMTP | CCSF_INCLUDE_BCC);
}
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
<Arthur Romanoff> wrote in message news:200871648...@yandex.ru...
X-Account-Key: account2
X-UIDL: GmailId11808d60b0e05f30
X-Mozilla-Status: 0001
X-Mozilla-Status2: 10000000
X-Mozilla-Keys:
Delivered-To: arthur....@linkgard.com
Received: by 10.115.110.10 with SMTP id n10cs29781wam;
Mon, 11 Feb 2008 06:11:30 -0800 (PST)
Received: by 10.78.185.15 with SMTP id i15mr15037838huf.61.1202739088278;
Mon, 11 Feb 2008 06:11:28 -0800 (PST)
Return-Path: <pargev.g...@linkgard.com>
Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158])
by mx.google.com with ESMTP id
n10si18845583mue.18.2008.02.11.06.11.27;
Mon, 11 Feb 2008 06:11:28 -0800 (PST)
Received-SPF: neutral (google.com: 72.14.220.158 is neither permitted nor
denied by best guess record for domain of pargev.g...@linkgard.com)
client-ip=72.14.220.158;
Authentication-Results: mx.google.com; spf=neutral (google.com:
72.14.220.158 is neither permitted nor denied by best guess record for domain
of pargev.g...@linkgard.com) smtp.mail=pargev.g...@linkgard.com
Received: by fg-out-1718.google.com with SMTP id d23so4542840fga.27
for <arthur....@linkgard.com>; Mon, 11 Feb 2008 06:11:26 -0800
(PST)
Received: by 10.86.90.2 with SMTP id n2mr15165861fgb.66.1202739086594;
Mon, 11 Feb 2008 06:11:26 -0800 (PST)
Return-Path: <pargev.g...@linkgard.com>
Received: from ?10.0.10.184? ( [91.103.31.34])
by mx.google.com with ESMTPS id b17sm14876226fka.4.2008.02.11.06.11.03
(version=TLSv1/SSLv3 cipher=RC4-MD5);
Mon, 11 Feb 2008 06:11:20 -0800 (PST)
Message-ID: <47B05780...@linkgard.com>
Date: Mon, 11 Feb 2008 18:11:12 +0400
From: Pargev Ghazaryan <pargev.g...@linkgard.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: Suren Samarchyan <suren.sa...@linkgard.com>,
Arthur Romanov <arthur....@linkgard.com>,
Ashot Petrosyan <ashot.p...@linkgard.com>,
garegin....@linkgard.com,
Christian Garbis <christia...@linkgard.com>,
Hovanes Manucharyan <o...@linkgard.com>,
LinkGard QA Team <q...@linkgard.com>,
Hrachya Petrosyan <hrachya....@linkgard.com>
Subject: Merge1: Meeting Minutes for Feb, 11 2008
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hi all,
Please find attached the meeting agenda and minutes. I will strongly
recommend to find time and read it. If nothing is messed/ missed there,
than these minutes may serve as baseline for our efforts on Merge1.
Please let me know if any question...
Thanks,
Pargev
But, MIMETOMAPI cannot correct convert Mime to LPMESSAGE.
I don't find Unicode symbol in this file. I don't know, what can I do....
And when file has multipart mode the convertation finished success.....
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Web Service and MAPI" <WebServi...@discussions.microsoft.com> wrote
in message news:3E426463-9CEA-48E3...@microsoft.com...