Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
OstroSoft SMTP Component
 OstroSoft Forums : OstroSoft SMTP Component
Subject Topic: Save as outlook msg Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
sivasakthi
Newbie
Newbie


Joined: 30 September 2005
Location: India
Online Status: Offline
Posts: 22
Posted: 28 July 2006 at 10:48am | IP Logged Quote sivasakthi

I want to save the mails in outlook format (*.msg). B'coz whatever I send from my application that has to be saved in local disk, and later the user can view the same using Outlook, instead of outlook express. Or .eml formatted mails can be opened in Outlook? Which one is possible?
 
Expecting a quick reply.
 
Kannan.
Back to Top View sivasakthi's Profile Search for other posts by sivasakthi
 
sivasakthi
Newbie
Newbie


Joined: 30 September 2005
Location: India
Online Status: Offline
Posts: 22
Posted: 28 July 2006 at 11:54am | IP Logged Quote sivasakthi

I found the code in VB for converting eml to msg format. Anyone want it? Post a reply to get it.

Kannan.



__________________

Thanks in advance,
Kannan.

Back to Top View sivasakthi's Profile Search for other posts by sivasakthi
 
Maverick
Newbie
Newbie


Joined: 24 July 2006
Location: Spain
Online Status: Offline
Posts: 14
Posted: 31 July 2006 at 9:12am | IP Logged Quote Maverick

Yes, I am interested

 

Regards,

Back to Top View Maverick's Profile Search for other posts by Maverick
 
sivasakthi
Newbie
Newbie


Joined: 30 September 2005
Location: India
Online Status: Offline
Posts: 22
Posted: 09 August 2006 at 2:19am | IP Logged Quote sivasakthi

You have to get Redemption Outlook dll to convert into msg formats. After installing the Redemption, you can use the following code. Please note, emlPath should contains the valid eml file path which was saved already using ostrosoft component or some others. Outlook 2003 reference is required.
 
Public Function SaveAsMSG(ByVal emlPath As String) As String
On Error GoTo Err_SaveAsMSG
 
Dim sMsgName        As String
 
Dim objPost         As Outlook.PostItem
Dim objSafePost     As Redemption.SafePostItem
Dim objNS         & nbsp; As Outlook.NameSpace
Dim objMAPIFolder   As Outlook.MAPIFolder
 
Set objNS = Outlook.GetNamespace("MAPI")
Set objMAPIFolder = objNS.GetDefaultFolder(olFolderInbox)
Set objPost = objMAPIFolder.Items.Add(OlItemType.olPostItem)
 
Set objSafePost = New Redemption.SafePostItem
 
objPost.Save
objSafePost.Item = objPost
objSafePost.Import emlPath, Redemption.RedemptionSaveAsType.olRFC822
objSafePost.MessageClass = "IPM.Note"
Rem: Remove IPM.Post Icon.
objSafePost.Fields(PR_ICON_INDEX) = Empty
sMsgName = "C:\TempMsg.msg"
 
objSafePost.SaveAs sMsgName, Outlook.OlSaveAsType.olMSG
 
SaveAsMSG = sMsgName
 
Rem: Move the item to the Deleted folder.
objPost.DELETE
 
Rem: Delete the item from Deleted folder too.
Set objMAPIFolder = objNS.GetDefaultFolder(olFolderDeletedItems)
If objMAPIFolder.Items.Count > 0 Then
    objMAPIFolder.Items(objMAPIFolder.Items.Count).DELETE
End If
 
Set objPost = Nothing
Set objSafePost = Nothing
Set objMAPIFolder = Nothing
Set objNS = Nothing
 
Exit Function
 
Err_SaveAsMSG:
SaveAsMSG = ""
End Function


Edited by sivasakthi on 09 August 2006 at 2:20am


__________________

Thanks in advance,
Kannan.

Back to Top View sivasakthi's Profile Search for other posts by sivasakthi
 
Maverick
Newbie
Newbie


Joined: 24 July 2006
Location: Spain
Online Status: Offline
Posts: 14
Posted: 09 August 2006 at 5:20am | IP Logged Quote Maverick

Thank you for your answer, sivasakthi

I will check your code.

Regards,

Back to Top View Maverick's Profile Search for other posts by Maverick
 
sivasakthi
Newbie
Newbie


Joined: 30 September 2005
Location: India
Online Status: Offline
Posts: 22
Posted: 12 August 2006 at 5:24am | IP Logged Quote sivasakthi

You are welcome. Feel free to ask any more help regarding Outlook.

__________________

Thanks in advance,
Kannan.

Back to Top View sivasakthi's Profile Search for other posts by sivasakthi
 
sreedharacharya
Newbie
Newbie


Joined: 14 October 2006
Location: India
Online Status: Offline
Posts: 1
Posted: 14 October 2006 at 8:56am | IP Logged Quote sreedharacharya

Hello Sivasakthi,

I am reading Exchange mailbox data and saving all the messages as .eml files. Now my requirement is I want to restore these .eml files back to the Exchange Server mail box.

From your mail I can understand that, we can convert the .eml file back to the msg using Redemption.dll. Also, can you please let me know the limitations with Redemption.dll in case if any.

My query is... do you have any idea on restoring messages back to the Exchange mailbox? It would be greatly appreciated if you can help in this.

Thank you in advance.



__________________
Sreedhar Acharya B
Back to Top View sreedharacharya's Profile Search for other posts by sreedharacharya
 
zlatan24
Newbie
Newbie


Joined: 15 July 2010
Online Status: Offline
Posts: 1
Posted: 15 July 2010 at 4:36am | IP Logged Quote zlatan24

sivasakthi wrote:
I want to save the mails in
outlook format (*.msg). B'coz whatever I send from my
application that has to be saved in local disk, and later
the user can view the same using Outlook, instead of
outlook express. Or .eml formatted mails can be opened in
Outlook? Which one is possible?

 

Expecting a quick reply.

 

Kannan.


My personal MS Outlook often uses, but some weeks ago. I
noticed a problem. Some my emails were hid. I tried to
fix this situation. But only this morning I have
understood that they have been lost. Luckily the Google
found -
">repair pst 2g this tool rapidly. And it solved my
issue,but some my friends had like problems and it helped
them too. Now I'm quite glad...

Edited by zlatan24 on 15 July 2010 at 4:37am
Back to Top View zlatan24's Profile Search for other posts by zlatan24
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.92
Copyright ©2001-2004 Web Wiz Guide