|
|
|
date: Fri, 02 May 2008 07:03:09 -0700,
group: microsoft.public.platformsdk.mapi
back
Re: Convert MIMEToMAPI and MAPIToMIMEStm
And the difference is?
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
<Arthur Romanoff> wrote in message news:2008521039rarthur@yandex.ru...
> Hi everybody.... I have following problem...
>
> 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);
> }
>
>
>
date: Fri, 2 May 2008 10:22:23 -0700
author: Dmitry Streblechenko
Re: Convert MIMEToMAPI and MAPIToMIMEStm
Yes - there will be differences. The composition of those two functions (in
either order) is not guaranteed to be idempotent. This isn't even a
reasonable goal, considering the mapping between MAPI properties and MIME
headers isn't 1-1. As an example, there are properties that are per recpient
in MAPI who's closest analogue in MIME is a per message header. Consider
also the issue of bodypart seperators. They exist in MIME, but MAPI has no
use for them.
"Dmitry Streblechenko" wrote in message
news:OXR3WkHrIHA.2292@TK2MSFTNGP03.phx.gbl...
> And the difference is?
>
> --
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
> -
> <Arthur Romanoff> wrote in message news:2008521039rarthur@yandex.ru...
>> Hi everybody.... I have following problem...
>>
>> 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);
>> }
>>
>>
>>
>
>
date: Fri, 2 May 2008 14:13:02 -0400
author: Stephen Griffin [MSFT]
Re: Convert MIMEToMAPI and MAPIToMIMEStm
Is that a Unicode or ANSI MSG file?
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Web Service and MAPI" wrote
in message news:AA889D42-E50D-4C11-9EA6-F7B5ECBF5E1F@microsoft.com...
>I have problem when I'm converting eml to msg with Japanese format. The
>body,
> which contains Japanese text shows correctly, but Subject, and recipinet
> dysplay name shows incorrect. What can I do? Pls help. Thenks very much.
>
> 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;
> }
>
date: Wed, 2 Jul 2008 08:33:15 -0700
author: Dmitry Streblechenko
MIMETOMAPI
I have the following eml file!!!!
Message-ID: <16159836.1075855377439.JavaMail.evans@thyme>
Date: Fri, 7 Dec 2001 10:06:42 -0800 (PST)
From: heather.dunton@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))
{
hr = pConverterSession_->MIMEToMAPI(pMimeStream, lpMessage , NULL, CCSF_SMTP | CCSF_INCLUDE_BCC);
}
date: Wed, 16 Jul 2008 01:08:38 -0700
author: Arthur Romanoff
Re: Convert MIMEToMAPI and MAPIToMIMEStm
I have the following eml file!!!!
Message-ID: <16159836.1075855377439.JavaMail.evans@thyme>
Date: Fri, 7 Dec 2001 10:06:42 -0800 (PST)
From: heather.dunton@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))
{
hr = pConverterSession_->MIMEToMAPI(pMimeStream, lpMessage , NULL,
CCSF_SMTP | CCSF_INCLUDE_BCC);
}
date: Wed, 16 Jul 2008 02:06:40 -0700
author: Web Service and MAPI
Re: MIMETOMAPI
Hard to see what the real data is, but my bet is that you have a mix of
Windows (0xD, 0xA) and Unix line breaks (0xD).
Look at the EML file in a hex editor to see if you can spot anything.
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
<Arthur Romanoff> wrote in message news:20087164836rarthur@yandex.ru...
>I have the following eml file!!!!
>
> Message-ID: <16159836.1075855377439.JavaMail.evans@thyme>
> Date: Fri, 7 Dec 2001 10:06:42 -0800 (PST)
> From: heather.dunton@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))
> {
> hr = pConverterSession_->MIMEToMAPI(pMimeStream, lpMessage , NULL,
> CCSF_SMTP | CCSF_INCLUDE_BCC);
> }
>
date: Wed, 16 Jul 2008 10:48:28 -0700
author: Dmitry Streblechenko
Re: MIMETOMAPI
This is original eml file.
X-Account-Key: account2
X-UIDL: GmailId11808d60b0e05f30
X-Mozilla-Status: 0001
X-Mozilla-Status2: 10000000
X-Mozilla-Keys:
Delivered-To: arthur.romanov@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:
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.ghazaryan@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.ghazaryan@linkgard.com) smtp.mail=pargev.ghazaryan@linkgard.com
Received: by fg-out-1718.google.com with SMTP id d23so4542840fga.27
for ; 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:
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:
Date: Mon, 11 Feb 2008 18:11:12 +0400
From: Pargev Ghazaryan
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: Suren Samarchyan ,
Arthur Romanov ,
Ashot Petrosyan ,
garegin.margaryan@linkgard.com,
Christian Garbis ,
Hovanes Manucharyan ,
LinkGard QA Team ,
Hrachya Petrosyan
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.....
date: Wed, 16 Jul 2008 23:56:05 -0700
author: Web Service and MAPI
Re: MIMETOMAPI
If you have a mix of different style line breaks, there is no chance I will
see that if you paste the MIME message into the body of your post.
Again, what do you see in a binary editor?
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Web Service and MAPI" wrote
in message news:3E426463-9CEA-48E3-AD89-1AE0798282C5@microsoft.com...
> This is original eml file.
>
> X-Account-Key: account2
> X-UIDL: GmailId11808d60b0e05f30
> X-Mozilla-Status: 0001
> X-Mozilla-Status2: 10000000
> X-Mozilla-Keys:
>
> Delivered-To: arthur.romanov@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:
> 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.ghazaryan@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.ghazaryan@linkgard.com) smtp.mail=pargev.ghazaryan@linkgard.com
> Received: by fg-out-1718.google.com with SMTP id d23so4542840fga.27
> for ; 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:
> 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:
> Date: Mon, 11 Feb 2008 18:11:12 +0400
> From: Pargev Ghazaryan
> User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
> MIME-Version: 1.0
> To: Suren Samarchyan ,
> Arthur Romanov ,
> Ashot Petrosyan ,
> garegin.margaryan@linkgard.com,
> Christian Garbis ,
> Hovanes Manucharyan ,
> LinkGard QA Team ,
> Hrachya Petrosyan
> 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.....
date: Thu, 17 Jul 2008 10:00:07 -0700
author: Dmitry Streblechenko
|
|