Outlook 2013 and GMail: I want outlook delete action to archive not trash

34,185

Solution 1

After searching in a lot of forums, posts, and comments,

A combination of two solutions finally fixed this issue for me on 3 different gmail accounts.

These are the steps:

  1. Delete the label "deleted items" from your gmail account (previous outlook version may have added this label, all the mail with that label will move to archive)
  2. In Outlook in the left nav folder list, click on "[Gmail]"
  3. Right click on [Gmail] .. IMAP folders
  4. Tick the box "When displaying hierarchy in Outlook, show only subscribed folders"
  5. Restart Outlook 2013

After the restart a new folder "deleted items (This computer only)" will appear in your outlook and from now on all of the deleted items will go there locally and to Archive on Gmail.

BTW, From now on you can see the "all mail" folder as well.

Enjoy.

Solution 2

  1. Gmail settings: Go to Gmail Settings -> Forwarding and POP/IMAP and set these options:

    1.1. When I mark a message in IMAP as deleted: Auto-Expunge on - Immediately update the server. (default)

    1.2. When a message is marked as deleted and expunged from the last visible IMAP folder: Archive the message (default)

  2. MS Office 2013 settings: Go to File -> Account Settings -> Account Settings -> Email Tab -> Select your account -> Change button -> More Settings -> Advanced Tab and set this setting:

    2.1. Under Deleted Items enable Mark Items for deletion but do not move them automatically

P.S. It worked for me. Now when I delete a message in Inbox, outlook only marks it for deletion and let the gmail do its default delete action (i.e. archive the mail).

Solution 3

I tried all of the above (except the Google Apps Script) to no avail, but I finally achieved the desired result by combining suggestions above with another tweak as follows. (I'm going to include all the settings I tweaked, even though some may not be necessary.)

(Warning: I'm just a tinkerer, not an expert.)

  1. In Gmail's Label settings, I have both "All Mail" and "Trash" set to show up in IMAP.
  2. In Gmail's IMAP settings, I have Auto-Expunge turned on (the default setting).
  3. In my Outlook account settings, I'm using the standard ports:993 and 587.
  4. In my Outlook account settings, under the "Advanced" tab, in the section under "Deleted Items", I selected the first option, "Mark items for deletion but do not move them automatically". Note that this is not the default option.
  5. In Outlook's IMAP Folders options, I have ticked the box, "When displaying hierarchy in Outlook, show only subscribed folders".
  6. It may not matter, but in my case, in order to get All Mail to show up in Outlook, I first tried to manually subscribe to the folder, and then finally I had to manually create an "All Mail" folder under [Gmail]. Then I right-clicked and selected "Process Marked Headers". This made All Mail show up normally.

I think that's it (unless I'm forgetting something). Believe it or not, with the above settings, I now have the desired behavior where deleting a message in Outlook simply causes it to be archived in Gmail. For all I know, it may be unnecessary to subscribe to the All Mail and Trash folders, but at this point I would rather not do any further tweaking, since for now everything is working perfectly. But I think the key is #4 above, perhaps combined with having Gmail's Trash folder included in IMAP.

Solution 4

After extensive research and obsessing on this, it appears that there is currently no way in Outlook 2013 to make SMTP messages be archived instead of going to trash. So, taking a different tack, I am letting Outlook 2013 delete them and then using an Google Apps Script to periodically to archive the messages out of trash.

function myFunction() {
  var threads = GmailApp.getTrashThreads(0, 200);
  GmailApp.moveThreadsToInbox(threads);
  GmailApp.moveThreadsToArchive(threads);

  if (threads.length > 0)
  {
    var emailAddress = Session.getActiveUser().getEmail();
    GmailApp.sendEmail(emailAddress,
                       'Moved ' + threads.length + ' messages out of trash.',
                       'Have a good day.');
  }
}

You can set the function up to run hourly or daily depending on your preference.

References:
https://stackoverflow.com/questions/11964870/gmail-api-move-from-trash-to-archive-using-script-google-apps-script
https://developers.google.com/apps-script/your_first_script
https://developers.google.com/apps-script/execution_methods#time-driven_trigger

Solution 5

There are two setups to accomplish what you want.

First, turn auto-expunge off in Gmail and select Archive as the expunge-time action. Then, in Outlook account settings, set items to be marked for deletion but only deleted when the account is updated. These two settings work to turn Outlook [delete] into Gmail archive. To actually delete the item, move it to Gmail trash.

Second, and perhaps more elegantly, instead of the above steps, subscribe to the All Mail Gmail folder. To archive the message, move it to the All Mail folder. To delete it, simply click delete or move it to the trash. Gmail will figure out what you want to do and will remove extra copies of the message.

Share:
34,185

Related videos on Youtube

Jersey Dude
Author by

Jersey Dude

Updated on September 18, 2022

Comments

  • Jersey Dude
    Jersey Dude over 1 year

    In Outlook 2010 there was an option to have the delete action move the e-mails into a specific IMAP folder instead of moving them to trash. That option is apparently has been dropped in Outlook 2013.

    When I delete an e-mail in Outlook 2013, it ends up in the trash folder on GMail. I prefer to just archive the e-mails in another folder/label and keep them forever or until I hit my 10 GB limit (which ever comes first :)).

    My GMail IMAP settings are:

    • When I mark a message in IMAP as deleted: Auto-Expunge on - Immediately update the server.

    • When a message is marked as deleted and expunged from the last visible IMAP folder: Archive the message (default)

    I would have thought that with these settings it would be impossible for an IMAP client to trash an e-mail.

    • Admin
      Admin over 11 years
      Outlook may be trying to be too clever, moving messages to the trash folder rather than merely marking it deleted. Not sure what to do about it if that's the case...
  • Jersey Dude
    Jersey Dude over 11 years
    I fear that this option is a like a ticking time bomb. From what I have read, these messages are still sitting there marked for deletion and will be deleted the next time a compaction or manual expunge request comes in (perhaps for a mobile device). Maybe that request will never be sent or maybe it will get sent and I will not notice it until the messages are gone.
  • Jersey Dude
    Jersey Dude over 10 years
    I was already on port SSL/465 when I reported this problem.
  • Jersey Dude
    Jersey Dude over 10 years
    #1: See ticking time bomb comment above regarding auto-expunge. #2: I do not want to have to change my behavior. I just want delete to archive like it used to.
  • Lucas D
    Lucas D almost 10 years
    As far as I can tell, my solution is safe in the sense that the "deleted" items in Outlook will never actually be "purged". Note the following link for reference: office.microsoft.com/en-001/outlook-help/…
  • mattgately
    mattgately almost 9 years
    +1 for instructions on how to really get "All Mail" to show up
  • Guillaume Filion
    Guillaume Filion almost 7 years
    This didn't work for me but Sina Momken's answer did the trick.