Until recently, this code * worked fine:
<cfimap
action="open"
server = "imap.mail.us-west-2.awsapps.com"
port="993"
username = "redacted@akhonline.com"
secure="true"
password = "redacted"
connection="aws01" />
<cfimap
action="getAll"
connection="aws01"
name="getAll"
attachmentpath="#expandPath('./')#attachments"
generateuniquefilenames="true"
maxrows="8" />
<cfimap
action="close"
connection="aws01" />
Yesterday, this started throwing the following error:
There is no connection available with name [aws01]
line number references the 2nd tag.
stack trace attached
Change the code to something like this *, and the example works again:
<cfimap
action="getAll"
server = "imap.mail.us-west-2.awsapps.com"
port="993"
secure="true"
password = "redacted"
username = "redacted@akhonline.com"
name="getAll"
attachmentpath="#expandPath('./')#attachments"
generateuniquefilenames="true"
maxrows="8"
connection="aws01" />
<cfimap
action="close"
connection="aws01" />
So, for some reason, Lucee can’t access or maintain a named AWS IMAP connection across <cfimap>
tags anymore. The connection apparently exists only for the work within one?
As noted earlier, this code has been working fine in it’s original form until recently. It’s possible that some updates were applied by sysops without my knowledge.
- Could some update have changed “allowed IMAP connections” (some unknown setting I’m guessing might be in Lucee, Java, or Linux?) to a bad value? (Something like Java BIO comes to mind)
- I cannot find any log / error entries to indicate why or when an IMAP connection would have been opened, closed or not created. Where should I look?
- Any other ideas or thoughts?
Those are my questions, thanks for reading!
These * examples (using two tags vs using one) are for simplicity, as our usage of sequential cfimap tags is actually for more complicated actions, like:
- Open connection (tag 1)
- Get a query of 8 emails in the Inbox, with their unique ids (tag 2)
- Parse each email for AWS notify structure, make database changes
- Use the open connection to reference one email by unique id and either trash it or move to another folder (tag 3)
- When done looping through the emails, close the connection (tag 4)
stackTrace.txt (2.9 KB)