Author Topic: Tasker integration, unreliable unless subject or body text is specified  (Read 5553 times)

davidmark

  • Newbie
  • *
  • Posts: 11
Have been running this thing for about six months on HTC One phones and in conjunction with Tasker. Am trying to process incoming emails from GMail.

If I specify a subject and/or body text to match, it seems to be 100% reliable (per the Tasker log). If I do NOT specify matching text, the results are maddeningly random. Some messages simply fail to show up in Tasker. Seems to work 10-20% of the time. Am trying to use %aqmsubject to filter incoming messages, but it obviously never sees the subjects of the missing emails. Alternative is to create a new Profile for every possible subject, which is less than ideal.

Anybody else out there trying to process all emails with a single Tasker Profile? If planning to, I'd advise against it until this issue is sorted.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
When the app receives multiple messages (during one mail check), and more than one of them matches a Tasker condition -- the condition's variables are filled in only once, typically these will be the attributes of the first newest message.

Or putting it more simply: the Tasker condition plugin can only tell you that *at least one* message matched. It does not guarantee that when there are multiple matching messages, the condition will be triggered multiple times, with the attributes of each matching message.

Does this seem like what you're seeing?
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

davidmark

  • Newbie
  • *
  • Posts: 11
Possibly that's it. The thing is that I never see the missed command in the Tasker log. I'll see lots of other messages coming in at the same time (which are ignored as the subjects don't match what I'm looking for), but the one message that matters fails to show up. Other times it works perfectly. I figured out at some point that this strategy wasn't reliable at all, but couldn't figure out why.

NBD as I plan to automate the creation of these profiles anyway. It works perfectly when there is a subject string specified. BTW, any possibility of doing matching (e.g. regular expressions) on that field? That would be very helpful.

Thanks for the fast response. I really like the app; other than this one issue, it has worked out very well.

PS. Would also be nice if I could also send emails from this app. The one I use as a workaround is a real PoS.
« Last Edit: July 13, 2015, 04:12:27 am by davidmark »

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
There are no missed commands -- the Tasker "condition" API really is that, a "condition" -- "are there any messages right now that match a specific condition". Doesn't matter if there is one or a dozen, one condition, one match result.

I suppose when you also specify a subject, you end up with multiple conditions, and each matches only one (or a few) messages.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Oh, and as far as sending goes...

If this existed, someone would use for sending spam sooner or later, and someone would report it (to their mail provider, to SPAMHAUS, etc), and then bad things would happen.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

davidmark

  • Newbie
  • *
  • Posts: 11
Oh, and as far as sending goes...

If this existed, someone would use for sending spam sooner or later, and someone would report it (to their mail provider, to SPAMHAUS, etc), and then bad things would happen.

On the previous reply, I meant "missed commands" in the context of my system, which is exactly what they are. True that specifying a subject (or body) helps minimize that possibility.

On the spamming thing, it seems like there are a million and one ways to automate emails. What's one more? Who could complain about an email client automating emails? I think most of them do. And there's already a Tasker-enabled Android app called SendSilentEmail and it's been around for a long time (unfortunately, it's not very good).

PS. What about wildcard (or RegExp) matching on the subject? I think that would be a good addition.
« Last Edit: July 18, 2015, 04:44:03 am by davidmark »

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
"On the spamming thing, it seems like there are a million and one ways to automate emails. What's one more? "

If there is a million and one ways to automate sending emails, any reason you're not using one of those?

"Who could complain about an email client automating emails?"

Just one possible scenario: someone who receives such spam message, with "Sent with AquaMail" in the signature (!!!) and a link to my web site (!!!!!) and then reports it to Spamhaus or whatever... From where it might make it to corporate mail filters, and who knows what else.

"What about wildcard (or RegExp) matching on the subject? I think that would be a good addition"

Yes it would be, but don't think it's going to happen any time soon, if at all.

I really think -- pardon my giving advice that you never asked for -- writing some scripts to run on a $5 / month VPS (such as Digital Ocean or whatever).

Personally I'd do it in Python, it has an easy to use IMAP library.

Or maybe consider If This Than That: https://play.google.com/store/apps/details?id=com.ifttt.dobutton

Or another "automate my computer stuff" product.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/