Transfer mail to other mail box
-
I am working on an application where i need to transfer mails from a mailbox to anoter one.I can not send these mails using smtp because this willchange the header information .I am using C# and out look api to process mails . is thre any way i can transfer mails to other mail box without changing mail header. By Transfer I mean, I need to take a mail from one mail box and move this to another mailbox without changing any header information. If I use smtp , header information will be changed. I have heared that using MAPI mail can be moved from one mail box to another mail box. any pointers.
-
Answer:
If you cannot load all relevant mailboxes into a single Outlook profile, then this cannot be solved using the Outlook API. It should however be possible to run a standalone application from an administrative account that accesses the Exchange information store directly via Extended MAPI. You can then open the source mailboxes sequentially and move the relevant mail items to the target mailbox. This would allow you to run a batch job harvesting all mailboxes from a central location in a single giant operation. If however your task is to move messages as they appear then maybe addressing this in a more decentralized fashion via Outlook addins installed on the source machines might be a more sensible approach after all. Maybe if you told us a little bit more about your motivation for moving those items we can come up with an even better solution. If you go for the centralized harvester approach I strongly recommend using a helper library like http://dimastr.com/redemption/ for this though as otherwise it will probably take a couple of months before you have gathered enough knowledge to address the task. The http://dimastr.com/redemption/rdo/ framework (Redemption Data Objects) should be especially well suited to get you running ASAP.
Kapilg at Stack Overflow Visit the source
Other answers
I was able to move the mails from one mail box to another using Redemption. This is like a copy mail from one mail box to another. First logon to the destination mail box using redemption.Get the referenceto the folder where you want to move the mail . In my case , it was inbox. now convert the outlook mail item to RDOMail and copy the rdomail to destination folder. here the is code - rdoSession.LogonExchangeMailbox("TEST", "ServerName"); RDOExchangeMailboxStore mailBoxStore = (Redemption.RDOExchangeMailboxStore) rdoSession.Stores.DefaultStore; RDOFolder inboxFolder = null; foreach (RDOFolder rdoFolder in mailBoxStore.IPMRootFolder.Folders) { if (rdoFolder.Name.Equals("Inbox", StringComparison.InvariantCultureIgnoreCase)) { inboxFolder = rdoFolder; break; } } rdoMail.CopyTo(inboxFolder); with this, mail will be copied to the new mail box without changing any header information.
Kapilg
If you use the Outloook API I'm sure there is support for backup and restore. So backup your mails from one account and restore it on the other. This would be my first try. PS: I'm not familiar with the API.
Drejc
What's the relationship of the mailboxes? Are they on the same Exchange server? If so, your best bet is to use MAPI to copy the messages. If not, you can either export the messages to a PST or to a collection of .msg files. Does this need to be automated?
Cain T S Random
What exactly do you mean by "transfer"? If you're talking about the equivalent of drag and dropping a mail from one mailbox to another loaded inside the same Outlook profile, then just use the MailItem.Move method.
Oliver Giesen
Then what you need is MAPI. It's a pretty complicated API. There's one, long-out-of-print book about it, but that's it. The best place to start is to download MFCMapi and look at how you might do what you need to, e.g. open two users' mailboxes and copy a message between them. Then, look at the source for MFCMapi and see how it's done, and work from there.
Cain T S Random
Related Q & A:
- Why is my mail box and calendar always temporarily unavailable?Best solution by answers.yahoo.com
- How i can change language in yahoo mail box?Best solution by Yahoo! Answers
- How can I transfer video from a dvr box to a computer?Best solution by Yahoo! Answers
- How to change the mail box language?Best solution by Yahoo! Answers
- Can I mail a small box in the mail box using post office?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.