AquaMail Forum
English - Android => How do I... => Topic started by: salman khan on September 26, 2015, 04:39:15 pm
-
Hi
I have developed small task to send sms by reading email on aquamail
Basically I did is that subject of email would be number and body would be text message
so I put %aqmsubject as number and %aqmtext
Now when single mail arrives it runs perfectly and send sms to desired number (which is mentioned on email subject)
but when more than 1 emails arrives like 5-6 request it only send 1 sms
I researched by modifying task and found that variable information coming from aqua mail is only 1 because only last email variable is being sent
Is it possible to download 1 email at 1 time every session?
-
Is it possible to download 1 email at 1 time every session?
I don't think that is possible (in a guaranteed way).
For the typical use of an e-mail program, you want to have all messages to be downloaded when they are available.
But here is what you can try:
If you configure your account to connect via IMAP, and enable Push, and the server supports proper function of Push, in principle, you can receive each message the moment it arrives to the server. And then you'll be getting them one-by-one. But even in that case, there is no guarantee that you might not get two messages at once, - if those were received on the server simultaneously. Nobody would ever care to work on achieving this.
For what you are trying to achieve, you might consider alternative (likely more involved) ways, - e.g. actually parsing all incoming messages.
Kostya - the Aquamail developer - might have some additional suggestions when he is back.
-
Yes, incoming messages are checked against Tasker conditions in batches.
Pent and I discussed "check every message" scenario, and Tasker wasn't quite ready for it. There were some optimizations he wanted to do. Not sure if those were ever implemented or not.
Even going by the name of this feature in Tasker (and AquMail) -- they're "conditions" -- so the idea is "did I just receive any messages matching .... some condition ....", no promise is made to call the Tasker script with each matching message's data.
-
Hi
Thanks for quick reply. I am very pleased with aquamail, its a good mail app.
I read also with K9, only last variable is stored and I belive that there is no more application so far created which can integrate fully with tasker.
STR floated an idea of parsing email, this could be interesting if all incoming emails are merged into a single text file which could be a kind of database. Takser started reading file and complete all task and at EOF delete file.
This could be start of new era of building database with help of incoming emails and machine responding to emails by performing commands.
-
Re: I read also with K9
K9 Mail's support is implemented right inside Tasker, using a K9 API.
AquaMail is a standard Tasker "Condition Plugin", using a Tasker API.