How to move message to Trash in gmail imap? - ios4

I am creating an application in which I need to delete mail using IMAP in gmail. But when I set the flag to delete the message moves to spam folder instead of trash or directly deletion. Is there any way to move message to trash?
UPDATE
Now my messages are moving from inbox to important folder. I'm sending message to my self( in web browser) and it's marked as important by default.

There is a Google support site that says "Do NOT save deleted messages to your [Gmail]/Trash folder because this will delete a message in all folders." - so you might want to do exactly that :)

Adding onto flob's answer
the following folder paths works too
it seems like it's depending on when the user sign up for gmail
"[Gmail]/Trash"
"[Google Mail]/Bin"
"[Gmail]/Bin"

Related

Datacap Email count and connect to a specific folder

I have two requirements in Datacap 9.0.1
I want to find how many emails that were sent to the done folder and
how many were sent to problem folder. This way, I can alert the
users that say, out of 10 emails in the inbox, 7 of them processed
successfully and 3 moved to the problematic folder. I know
EmailCount variable gives me the count of emails that datacap was
able to read successfully/moved them to the done folder but what I
want is the initial count of emails so that I can find a difference.
Is it possible within datacap to scan a folder other than Inbox? For
Ex, if I want to scan 'Sent Items' folder how would I do that? I
looked into the email connection actions, but I don't see anything
which can help me to connect to the folder that I want.
Ok, this is the answer that I got from another datacap forum. Posting it here so that it helps others
Not sure about number 1. I believe that would require modifications to the mail actions.
For #2, no, there is no way to specify something other than inbox.
Both of these would likely require some sort of enhancement.
Here the enhancement means creating datacap custom actions. I haven't tried creating one and in case if I happen to create, will post the details of it.

Why attachments from Gmail drafts copied to Trash?

I use this Gmail API request for fetching Gmail messages in user mailbox. I need to list messages from Trash as well. But in some cases message list got by list messages request is different from actual content of Trash folder content.
To reproduce the problem next steps can be performed:
Ensure that my Trash folder is empty - no messages visible in Gmail web client and API list messages request returns 0 messages in Trash.
Start creating message by pushing "COMPOSE" button in Gmail web client.
Attach file to this draft message.
Get messages list in Trash using Gmail API list messages request.
The request returns 1 new message in user Trash folder (with the file attached to draft mentioned above) however it`s not visible in Gmail web client.
Is it normal or kind of bug? Is this a problem of Gmail web client or Gmail API?
Based from this thread, when you upload a file to Gmail as an attachment, Gmail creates a temporary file to hold the data and is then sent to Trash.
So, to get a more precise search, try adding q parameter using the advanced search syntax.
See Searching for Messages to learn more.

Outlook REST API - getFolders not returning all folders

I'm just getting started with the Outlook REST API. My baseline is the tutorial that uses node-outlook.
First order of business is to retrieve all of the folders in my mail account.
So I issue this REST request:
GET https://outlook.office.com/api/v2.0/Me/MailFolders
Instead of returning all of my folders, it only returns the "well known" folders:
Clutter
Deleted Items
Drafts
Inbox
Junk Email
Outbox
Sent Items
Trash
Am I missing a query parameter or something that says, "no, really, all of them please"?
UPDATE
I tried a different email account, and I also don't get all of my actual folders, but I get a different subset (some of which are well-known, others aren't).
I am implementing the paging protocol (using the #nextLink parameter) so it's not a matter of page sizes. I am getting these 8 folders on one account, and 18 folders on another.
So there must be something that decides what folders will be returned.
UPDATE 2
I changed to doing a folder sync instead using the "beta" API. In this case, I also get an unnamed folder in the list, which is the parent of the other folders. It comes along with a ChildFolderCount which is accurate. However, when I do a child folder request on that folder id I get the same list.
UPDATE 3
Here's the request url I'm using when I attempt to read the child folders of the one folder that comes back with a non-zero ChildFolderCount.
GET https://outlook.office.com/api/beta/Me/MailFolders/AAMkADRmMzFmNjZmLWU3MjctNGZiNi1iZTg4LTRmNGQwYTVhMDgxYgAuAAAAAAB8IxaZ5KGbQom4EPywGCSdAQDVy0eYwAzLS63k5pohzykCAAAAAAEJAAA=/childfolders
Here's what appears to define what folders are returned by this API and what are not:
If I create a folder in office365 directly on outlook webmail, it shows up in this query.
If I create a folder in Mac Mail, it does not.
Mac Mail accesses the service using EWS, so I would expect a folder created by it would be like any other folder.
So there is something about folders created on Mac Mail that prevents them from being returned by this API.
Folders created in Mac Mail DO show up in web mail and vice versa.
Folders created on an iPhone DO show up, so in my limited testing it looks like Mac Mail may be the only app suffering from this problem. The problem I have is most of my folders were created in Mac Mail and I have no easy way of rebuilding them.
I'm thinking this is just a BUG in the API. At any rate, this answers my original question and should help anyone out there trying to use the new API.
If I find a workaround I'll post it here.

GMail email import

I would like to move all of my ARCHIVE incoming and outgoing mails to GMail. I have admin rights on the server, where all my emails are stored, so I may set up Imap (current case), POP3 or even I write an app, if necessary. If it is possible, I would like to preserve also folder sturcture (of course, as labels). Is there any way to solve this problem?
ThX,
Fx
Just a thought: You can use a third party software such as Thunderbird to fetch all the emails and then simply drag and drop into the Gmail account also connected to the same Thunderbird client. I have found that Thunderbird seems to preserve file structure and labels, and auto creates more if they don't exist.
Worth a shot!

Setting up a MRA (fetchmail/getmail) to pull all folders from Gmail over POP/IMAP

I would like to setup fetchmail or getmail to pull email from Gmail. I would prefer it to be IMAP but I can live with POP as well. The issue I'm running into is that all these seem to want you to specify the exact list of folders you want checked (this is cleaner in IMAP than POP).
This is a hassle since I frequently change my list of folders and when I do, I don't want to have to change my configuration file to add/remove folders. When something changes, I automatically want a mbox or a maildir directory to 'show up' with the contents of my new folder. I would also prefer the mbox to have the same name as the folder on the server
The closest thing I could find was the -r option in fetchmail but that doesn't seem to do this either. I'm sure I must be missing something since every email client is able to do this and I'm hoping that that functionality lives inside the MRA and not in the MUA.
Update: I'd like to move this thread to Serverfault and I'm ok with voting to close this and migrate. Unfortunately, I dont have the rep to do it myself yet
With getmail you can use the following line in your configuration to get all your mail :
mailboxes = ("[Google Mail]/All Mail",)
With IMAP you can list the folders on the server, that way email clients can do whatever they need. In getmail it depends on how the email retrievers are written. If this configuration does not work, you can check the IMAP retriever code and write a specific one that suits your needs ;-)
my 2 cents
PS: I have no getmail installation to check if that do the trick ...
You could look into imapsync. It is designed to recursively sync up IMAP accounts. You will need an IMAP account for the destination. I have not tested it with gmail but if gmail is a well behaved IMAP server it should work.

Resources