This is a follow up to getting mailing retrieval going. There were 2 mailings retrieved by getMailings that 'didn't exist' - causing the script to fail. I worked around it by fetching mailings either side. Only 2 in 450 days but not sure if it will happen again.
eg. 52835553 - these caused the script to crash & I got around it by just skipping a time portion.