Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Emails fetching being missed

Featured Replies

Hi

I am using this plugin 360email Works and for some reason ever so often(actually on a daily basis) emails are being missed.

I would appreciate if someone could help me with this issue.

Hello,

 I am assuming that you are saying that there are emails that should be pulled into FileMaker but are not. Can you elaborate on your use case? What version of the plugin are you using? Is this a server side script? Are you doing any filtering in the EmailReadMessages call? Do you see any pattern to the emails that are being "missed? like does it happen at a certain time or randomly? from a specific recipient? etc? Any additional details?

  • Author

Hi 

Thanks for your prompt response.

Yes you are correct , that some emails that should be pulled into filemaker are randomly being missed with no pattern. 

I am using a most recent demo version on my local file in filemaker 18 advanced.

My script for EmailReadMessages

EmailReadMessages( 
    "mailbox=" & MailboxBrowse::name ;
    "readonly=true" ;
    "max=" &  Account::batchSize ;
    "skip=" & Count(MessageBrowse::id) ;
    "attachments=false" ;
    "progress=true"
)

I suspect this may be caused by the max and/or skip parameters. How does the value in the MessageBrowse::id field get set? Is the batch size field value always the same? Are the messages that are being skipped in the middle of the batch of expected emails or are they are at the end of this batch (i.e. most recent message or oldest message)? Is it multiple emails being skipped in the expected batch?

Does this happen in a particular mailbox or do you see it any mailbox?

  • Author

The messages that are being skipped randomly , sometimes just one in middle of a batch and in many occasions a whole series of emails. The batch size is always the same set on a figure set in the field.

It has definitely been noticed in inbox i have not focused on others.

 

below is the script that sets the message id

image.png.33237725b699379bad27c70adf431864.png

I think I am missing something, how is the value in the MessageBrowse::Id field set that is used in the calculation for the skip parameter? 

 

  • Author

image.png.b684092239aa8c1ebea4c0fdcb4de45b.png

image.png

is this what you mean?

I'm not sure you are using the skip parameter correctly. Perhaps I am missing something, is MessageBrowse::id a repeating field? If not and you are storing a messageID in the MessageBrowse::ID field and then calling Count, I would expect that it would always return 1 because there is only one value in that field.  

It may be that you are using the skip parameter as a way to skip over messages that you have already read in. I would recommend using the UID parameter instead. This tells the plugin to only fetch messages whose uid is newer than the one passed in. This is very useful for only fetching new messages from IMAP mailboxes. When looping through new messages, call EmailReadMessageValue("uid") on the last message and save this to a field in your database. Then when fetching new messages, pass this uid in as a filter argument. Only newer messages will be returned. If you specify this option and the mailbox is an IMAP mailbox, some of the other search filters (skip, to, from, date) will be ignored.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.