POP3 Timeout list

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
mchan8888
Newbie
Posts: 2
Joined: Wed Sep 04, 2013 10:17 pm

POP3 Timeout list

Post by mchan8888 » Wed Sep 04, 2013 10:23 pm

I have a very basic script which just has a few lines of code for checking various POP3 email accounts I use. It just has the settings and everything is for the same provider, and that is followed by new lines for all the user account info.

Sometimes, for whatever reason, there is a missed connection to the server or for whatever reason a certain message isn't downloaded. I know this because I am expecting certain messages and after a certain amount of detective work I can track down which account did not have a certain email download.

Keeping in mind the account information is correct, is there any way for the script to tell me at the end of its run which accounts it couldn't access if that is what is happening?

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1417
Joined: Sun Nov 03, 2002 3:19 am

Post by Dorian (MJT support) » Fri Sep 06, 2013 12:39 am

Are you using a timeout setting? The default is only five seconds, so that might not be enough. You can increase it like this :

Let>POP3_TIMEOUT=60

Also, it might be worth fetching the POP3_RESULT and either popping up a message if it's unsuccessful, or maybe writing POP3_RESULT to a log file.

MessageModal>POP3_RESULT

I have a feeling that different mail servers might give different messages. Mine says "sayonara" when it signs off successfully. If I purposely fudge my login details, I get "bad login".

The following script will log in and retrieve email. Entering bad login details will write the following error to a txt file named errors.txt

"Account1 - 2013-09-05 at 17:35
Bad login"


Code: Select all

Let>POP3_STATUS=1
Let>POP3_MSGSIZELIMIT=3
Let>POP3_TIMEOUT=60
RetrievePOP3>2hosts.com,[email protected],XXpasswordXX,%USERDOCUMENTS_DIR%\emailfiles
MessageModal>POP3_RESULT

if>%POP3_RESULT%<>Sayonara
year>theyear
month>themonth
day>theday
hour>thehour
min>theminute

writeln>%USERDOCUMENTS_DIR%\emailfiles\errors.txt,,Account1 - %theyear%-%themonth%-%theday% at %thehour%:%theminute%%CRLF%%POP3_RESULT%
endif

Separate>POP3_MSGFILES,;,MsgFiles
MessageModal>Files Downloaded: %MsgFiles_count%%CRLF%File List: %POP3_MSGFILES%
Last edited by Dorian (MJT support) on Fri Dec 27, 2013 12:13 am, edited 4 times in total.

mchan8888
Newbie
Posts: 2
Joined: Wed Sep 04, 2013 10:17 pm

Post by mchan8888 » Sat Sep 07, 2013 3:00 am

Thank you, that was EXACTLY what I was looking for!

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1417
Joined: Sun Nov 03, 2002 3:19 am

Post by Dorian (MJT support) » Sat Sep 07, 2013 6:51 am

My pleasure, mchan. One thing I should mention. I just noticed that part of my code in the textarea had been munged. So I have edited it and it's fine now.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts