How to move an email from user mailbox to shared mailbox using apps for office mail app

How can I move an email from a users main mailbox to a shared mailbox using apps for office.  I know I can do this manually but i am creating an for owa/outlook that would be a button to move the item.  I have tried using ews but can only find
the commands to move emails inside the users mailbox
for example : 
'<?xml version="1.0" encoding="utf-8"?>' +
        '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +
        '               xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"' +
        '               xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"' +
        '               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
        '  <soap:Header>' +
        '    <t:RequestServerVersion Version="Exchange2013" />' +
        '  </soap:Header>' +
        '  <soap:Body>' +
        '    <m:MoveItem>' +
        '      <m:ToFolderId>' +
        '        <t:DistinguishedFolderId Id="junkemail" />' +
        '      </m:ToFolderId>' +
        '      <m:ItemIds>' +
        '        <t:ItemId Id="' + id + '" ' +
        '                  ChangeKey="' + changeKey + '" />' +
        '      </m:ItemIds>' +
        '    </m:MoveItem>' +
        '  </soap:Body>' +
        '</soap:Envelope>';
Can I create a xml that would would do this?  Is there a way to do it using the EWS service reference.  I do not want to use import/export to do this.  

yes I was able to make it work using Microsoft.Exchange.WebServices.Data and writing it as a web API,  however i am unable to to authenticate the user if it is hosted on another server (without them retyping their password.  I assume that
their is a matching java script version of what i am doing on the api side.  I am just stuck trying to figure it out.  the below code works as a Web Api if i could authenticate the user.    
            ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013);
            service.Url = new Uri("Ews url");
            service.Credentials = CredentialCache.DefaultCredentials;
            //service.UseDefaultCredentials = true;
            // Create a new folder view, and pass in the maximum number of folders to return.
            FolderView view = new FolderView(5);
            // Create an extended property definition for the PR_REPLICA_LIST property.
            ExtendedPropertyDefinition PR_REPLICA_LIST = new ExtendedPropertyDefinition(0x6698, MapiPropertyType.Binary);
            view.PropertySet = new PropertySet(BasePropertySet.IdOnly, FolderSchema.DisplayName, PR_REPLICA_LIST);
            // get to the inbox folder of spam mailbox
            Mailbox SpamMailbox = new Mailbox("Smtp of other mailbox");
            FolderId SpamInbox = new FolderId(WellKnownFolderName.Inbox, SpamMailbox);
            Folder SpamFolder = Folder.Bind(service, SpamInbox);
            FindItemsResults<Item> findItems = service.FindItems(WellKnownFolderName.JunkEmail, new ItemView(10));
            foreach (Item item in findItems)
                item.Load();
                ItemId ItemToMoveId = new ItemId(item.Id.UniqueId.ToString());
                Item ItemToMove = Item.Bind(service, ItemToMoveId);
                ItemToMove.Move(SpamFolder.Id);
                //item.Move(SpamFolder.Id);

Similar Messages

  • How to move an email from one mailbox to a folder in my icloud mailbox

    My ipad has 3mailbox and am trying to move an email i have just recieved from one of my mailbox to my icloud folder on my icloud mailbox.when i check on the email then click on edit,move, select mailbox(icloud) then choose the folder to move.when i click on the folder my mail application just closes and wheni re open it the mail which i was moving it its just there on the same mailboz.any ideas to solve this.

    http://i11.photobucket.com/albums/a154/eastcoasthandle/3.jpg
    http://i11.photobucket.com/albums/a154/eastcoasthandle/4.jpg
    These 2 pics should further show/explain what I am talking about as I am not sure of the proper name for this process.

  • I can not send email from my iPad .  Have been using it for over a year, all of a sudden I can only receive email.  I have a wifi connection in my home and have a A T &T cellular data plan?

    I can not send email from my iPad .  Have been using it for over a year, all of a sudden I can only receive email.  I have a wifi connection in my home and have a A T &amp;T cellular data plan?

    I have a 1st gen iPhone that I just updated the software to 2.0.2
    Now whenever I press the mail icon it goes to the mail app for about 4 seconds, does nothing, no loading of folders, old messages, nothing.
    Then it reverts back to the home screen. Tried restarting, haven't tried restoring, thought I'd look here first.
    Anyone???

  • How to move all emails from mailbox to an external email account in Exchange Server 2007?

    I have a user who is leaving the university in a few days. The user would like to forward all of their old emails from their mailbox to their G-mail account. Will setting up email forwarding forward all of the old emails to the G-mail account or just the
    new emails that are received after setting up email forwarding? If forwarding isn't the correct solution; then what is? We are running Exchange Server 2007.

    No, as you've suspected the forwarding will only affect new messages coming into the mailbox, not existing ones. Additionally, if you did get all existing messages to forward to another account (you could probably do it by creating a rule in Outlook) then
    the gmail account would show every single one of them as arriving now, and lose their existing send date.
    Probably a better option would be to export the mailbox to .pst, and then assuming the user has their gmail account configured in Outlook somewhere as something other than POP3 they can then open the .pst file on their machine and copy the messages over
    to their gmail account, which I think would also preserve the original information.
    You could do that via the server using Export-Mailbox as described here
    http://technet.microsoft.com/en-gb/library/bb266964(v=exchg.80).aspx (note it has to be run from a 32-bit OS with the Exchange Management tools installed), or the user could just as easily do it themselves from within Outlook using the Export option.

  • How to move multiple emails from Mail to my folders on the hard drive

    I would like to be able to move multiple emails at a time from a given mailbox to a selected folder on the hard drive in a format that I can subsequently read.
    I know I can move them one at a time in RTF. And either RTF or HTML would be fine (along with whatever attachments) as a format.
    But I can't seem to find either a command or a format that will allow me to do this.
    My goal isn't archiving -- I want easy access to these emails and their attachments. I just want to get them out of Mail and into the folders on my hard drive that have other documents with related content.
    I would greatly appreciate any advice that someone could give me.
    Ed

    Andreas Amann’s Mail Scripts has an Archive Messages script that you may or may not find useful.

  • Exchange 2013 - moving an email from user inbox to Shared Mailbox removes images

    Good afternoon,
    Employees that are setup with Shared Mailboxes are experiencing a weird issue today.  They embed an image into an email and send it to a co-worker.  The co-worker sends it back and when they drag and drop it from their user mailbox into the Shared
    Mailbox, the image is gone.  The Outlook client settings are correct and the format of the emails are HTML.  Trying to change the format does not resolve the issue.
    One comment I did want to make is that we are currently transitioning from Exchange 2007 and 2010 to Exchange 2013.  We moved all of our Shared Mailboxes over to 2013 and we have a majority of users moved over already.  Could this be an issue with
    using a mixed environment?  Thanks!

    I confirmed that both the employees and Shared Mailbox are both on Exchange 2013.

  • How to move saved emails from pc to iPad?

    my wife is moving from a pc dosbox to my old ipad2.
    She has saved mail in catagories on her pc. The catagories moved to the ipad, but the content of each did not.
    Any ideas how to move content to the ipad?
    Thanks

    ps: the ipad was synced to my MacPro, not the dosbox. But the mail box from her hotmail transfered the catagories.

  • How to Move All Emails from MAIL to ENTOURAGE

    After 30 years married to Windows I have filed for divorce and am entering a new relationship with Apple via a new Black MacBook. (you may have heard the expression "once you've gone Black you'll never go back"!)
    Although many Mac things are elegant the move from Outlook Express and Outlook to MacMAIL was disgustingly painful and amateurish. I now have 25,000 emails mixed up together in MAIL. (They were formerly neatly separated in Outlook Express into various accounts with sub-folders according to my various businesses and projects.) The Apple store that guided me was totally uninformed about the abiity to transfer intact account structures from Outlook Express and Outlook and so I am left with 10 years of filed emails all mixed together ... what a disaster in my first week of the new marriage!!
    It appears to me that MAIL is not the serious business email program I need. I have heard that Entourage might be more powerful and flexible, and in fact is similar in functionality to Outlook. My HUGE concern however is the continuation of my pain in moving my emails again.
    Can anyone assist me with credible advice on (a.) how to make the move (b.) is Entourage a truly business-strength program (c.) are there any programs to facilitate the transfer, and (d.) how can I get the file organization back again?
    I have 6 separate accounts and own all my own domains through which I have my email services (incoming and outgoing mail is controlled by my servers).
    This is my first real experience with Apple and it has been painful. While Apple seems truly superior in audio, video, music, graphics and "cool designer widgets" I have found that in a serious business environment in which email is a foundation of our businesses that Apple lags behind. I really hope to be able to embrace the Mac world totally but I am unimpressed about what I have found so far. I would be deeply grateful for any helpful comments.
    Paul
    MacBookBlack   Mac OS X (10.4.8)  
    MacBookBlack   Mac OS X (10.4.8)  
    MacBookBlack   Mac OS X (10.4.8)  

    Have you used Entourage's import feature?
    It may not be exact since Entourage does not use the same account and filing structure as Mail but it will be close. There isn't any other way to transfer all Mail.app mailboxes and messages to Entourage that I'm aware of.

  • How to move the changes from one system to other without using CMS

    Hi
    In our project they are migrating NWDI 6.40 to NWDI 7.0.
    During migration CMS won't be available.
    Could you plesae tell what are the different options are there to move the WebDynpro changes from (NWDS) Development to Quality system and then production system without using CMS server?
    If i will create a development package and import this packgae in Quality package will my new changes also be available in Quality server?
    Thanks & Regards
    Susmita

    Hi Susmita
    I wasn't completely sure, but from your description of your problem, it seemed like you would have access to your DTR during your upgrade. The following solution assumes as much. If this is not the case, you'll need to do things slightly differently, but the solution will still be possible.
    Depending on the scope and size of your changes, it may be practical for your developers to deploy directly from their NetWeaver Developer Studio (or for a designated administrator to install the NWDS and do the same). To do so, from the Development Configurations perspective, create a new NWDS project for each of the DCs you want to deploy. Then right-click the project and choose from one of the deployment options. (Deploy new archive and run will allow you to see if your deployment has taken effect.) When deploying, the target server is the one set up as your J2EE engine in the NWDS properties - you'll consequently have to modify this when the target server for your deployment changes (from QA to production, or vice versa).
    Note that this is only applicable in certain situations, and only as a short term stopgap measure. This sort of practice - developers or administrators deploying haphazardly to servers other than those intended for development - is precisely what the NWDI is designed to prevent (and is one of very few things it's fairly good at doing). For instance, if your QA and production systems are attached as TEST and PROD runtimes systems respectively in your NWDI, a full assembly and subsequent full deployment would usually occur to these servers when deploying with the NWDI. This is a much stronger guarantee of consistency than the build that will be performed within your local NWDS to deploy your changes. (Conversely, the rigidity of the assembly is perhaps the NWDI's greatest design flaw.)
    (Also, Snehal: thanks for the information on the sapmake_util blog. It's not something I've encountered before and looks very useful.)
    James

  • Differentiate bulk email from user email

    Currently i am looking for best practices regarding differentiation of bulk email and user email. I know i could be done by setting up different interfaces with their own private listeners, however, this way applications that send bulk email have to be reconfigured.
    The question is: are there other best practice config examples how to differentiate bulk email from user email? Of course, this concernes outgoing  email traffic.
    Thanks in advance!
    Nino Laudani

    Currently i am looking for best practices regarding differentiation of bulk email and user email. I know i could be done by setting up different interfaces with their own private listeners, however, this way applications that send bulk email have to be reconfigured.
    The question is: are there other best practice config examples how to differentiate bulk email from user email? Of course, this concernes outgoing  email traffic.
    Thanks in advance!
    Nino Laudani

  • How do I move a file from my mailbox to my desktop/

    How do I move a file from my mailbox to my desktop ?

    As there is no "desktop" on the iPad, do you mean you want to move a file attachment from an email received on your iPad to the desktop of your computer?
    If so, the easiest way is just to access your email account on your computer and save the attachment directly.

  • How do I move Outlook email from Windows to iMac

    I have decided to move from Windows (Vista) to iMac (Mavericks) and need to move all my email from my Windows PC (Outlook 2010) to iMail. 
    I've found several suggestions on the internet including various software applications for converting from one to the other although most seem to indicate problems with lost emails.  Is there a recommended method from Apple which works?
    Any help appreciated.
    Alan

    Hi Scribeswtr,
    If you are storing your emails locally on your Windows machine and would like to move them to your new Mac, you may find the following article helpful:
    Mac OS X Mail: How to transfer downloaded email from a non-Mac computer
    http://support.apple.com/kb/ht1534
    Regards,
    - Brenden

  • How do I extract email from a form and send the PDF to that user?

    How do I extract email from a form and send the PDF to that user?

    here you can add email to send to, CC, Subject, and body message
    var oDoc = event.target;
                        oDoc.mailDoc({
                                                                bUI: false,
                                                                cTo: "Agency Contact Email",
                                                                cCC: "",
                                                                cSubject: "Write your title here,
                                                                cMsg: "Dear" + AgencyContact + "(" + AgencyContactEmail + ")\nThe student, " + FirstName + " " + LastName + " has applied to work at your agency. Please confirm they can work here blah blah blah.......\n\nThanks.\n\nrespectuflly,\n\nme"

  • How do you mass archive emails in iclould mail?  I have 330,000 emails and what to move old emails from my inbox to a managed folder. Can anyone help?

    How do you mass archive emails in iclould mail?  I have 330,000 emails and what to move old emails from my inbox to a managed folder. Can anyone help?

    Winston - thank you for your reps but that is common sense... Icloud only displays 50 emails at a time. So your recommendation doesn't work if you have 330,000 emails in your inbox. I am looking for a way to do a mass move.. Like a filter or rule that runs in the inbox. Current rules can only work as emails arrive.
    Any other thoughts?

  • How to move database objects from one user to another user

    Could someone help how to move database objects from one user to another user
    Thanks in advance

    Thanks a lot for the reply.
    Actually I wanted to know whether there is any command to change the owner ship of the table.
    For ex table1 belongs to user1. can the owner of table1 to be changed to owner2.
    directly using an oracle command. I knew that it can be done using import and export, since the table was 200 million thought the rename command would be faster instead of import and export.
    Thanks Billy for letting me know that it is not possible using oracle query.

Maybe you are looking for

  • Difference between New Formula and Formula Variable

    Can any body explain what is the difference between  New Formula and Formula Variable. Thanks

  • Phone hangs once battery goes flat!

    Hi, I am using Iphone 3G 8GB. But everytime my phone's battery went flat, the phone will hang. Then it will prompt me to restore thru itunes (a picture of a itunes icon on top and a USB plug below). So i tried to do as it says. However the my phone i

  • [SOLVED] KDE black screen on resume after suspend

    Yesterday I wasted the day investigating this and at the end the problem was not suspending the computer but the KDE lock screen as explained here. I thought to open a new thread so other people would not wasted their time looking into the wrong issu

  • Schedule line category  is in grey mode

    Hi All, Schedule line category is in grey mode at the time of sales order creation inspite of assigning other schedule line category as manual sc.category in schedule line determination. I am also not able to change in change mode. Earlier i was able

  • My late 2009 iMac is starting to refuse to play DVD's.

    My late 2009 iMac is starting to refuse to play DVD's. Any ideas? It is still in warranty till Nov 2012. it will accept all DVD's, but some it will not play, justs searches for a bit, then spits out. others it plays ok. There appeasrs to be nothing (