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

14

8

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.

Jersey Dude

Posted 2013-02-01T00:07:35.930

Reputation: 487

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... – Darael – 2013-02-01T00:10:39.977

Answers

7

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.

Eli

Posted 2013-02-01T00:07:35.930

Reputation: 71

I have performed these steps, but did not get the results you described. I'm going to try the option to not purge the mail in outlook. – mattgately – 2015-06-25T13:22:50.903

1This didn't work for me but Sina Momken's answer did the trick. – Guillaume Filion – 2017-08-02T15:52:26.487

6

  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).

Sina Momken

Posted 2013-02-01T00:07:35.930

Reputation: 61

3

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

Jersey Dude

Posted 2013-02-01T00:07:35.930

Reputation: 487

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.

Lucas D

Posted 2013-02-01T00:07:35.930

Reputation: 41

1+1 for instructions on how to really get "All Mail" to show up – mattgately – 2015-06-25T13:25:43.743

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: http://office.microsoft.com/en-001/outlook-help/purge-imap-items-marked-for-deletion-HP010080420.aspx

– Lucas D – 2014-05-24T17:15:59.013

1

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.

bwiernik

Posted 2013-02-01T00:07:35.930

Reputation: 11

#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. – Jersey Dude – 2013-09-10T12:38:55.067

0

Turning Auto-Expunge off in Gmail fixed this for me.

Kurt

Posted 2013-02-01T00:07:35.930

Reputation: 1

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 – 2013-02-11T15:13:50.473

0

This... seems to work, consistently and with multiple accounts.

However, it does seem a bit... dubious, not to mention counter-intuitive, if not ridiculous. Oh, and just plain goshdarn surprising. I almost hesitate to post it, but as I said it empirically works, consistently.

When defining a Gmail account in Outlook, you need to manually set the port numbers and protocols.
According to the Google help docs, IMAP requires SSL and uses port 993; SMTP requires TLS / SSL (depending on which line you read) and uses either port 465 or 587.

Well, port 465 only works with SSL (not TLS), so I've always gone with TLS on 587.

On a lark, I set the account to use port 465 with SSL.... and now the Delete action does indeed Archive the emails.

Again, when using TLS/587 Outlook Delete erases the email; with SSL/465 Outlook Delete results in a Gmail Archive.

Simply shocking behaviour.

AviD

Posted 2013-02-01T00:07:35.930

Reputation: 481

I was already on port SSL/465 when I reported this problem. – Jersey Dude – 2013-09-10T12:38:23.987

0

I have the same problem, here's what i do and think it will work:

  1. Deleted items still go into the trash folder no need to change anything
  2. setup autoarchive in outlook 2013 to archive every 5 days or so (or even more often if you want)
  3. setup the trash folder by right clicking -> porperties - to archive any items that are older than 1 day (!)
  4. set it up to move old items to the standard archive folder or any other folder you may choose.

there you go - all items will now be moved to your archive folder every few days and that folder can be set up to be deleted after eg 24 months or so or whatever you want.

Sander Bos

Posted 2013-02-01T00:07:35.930

Reputation: 1