Good news to whoever stumbled upon this forum post. I found a work
around to avoid using the cfpop tag:
Its basicly calling the java methods directly, I used the following code to
log in to the cfpop account:
<cfset javaSystem = createObject(“java”, “java.lang.System”) />
<cfset jProps.setproperty(“mail.pop3.port”,995) />
<cfset jProps.setProperty(“mail.pop3.socketFactory.port”, 995) />
<cfset msession = createObject(“java”, “javax.mail.Session”)>
With this, the session gets created directly and logs in.
now, by using the getMessages() method within the variable the I named
“msgs” I can use any method that I need and populate the strings or any
value to a new query object.
In this example I populated the query object that is created en <cfpop
action=“getheadersonly”… > is used:
<cfset get_emails = queryNew(“subject,from,MessageNumber,date”,
querySetCell(get_emails, "subject", "#msgs[i].getSubject()#");
querySetCell(get_emails, "from", "#msgs[i].getFrom().toString()#");
querySetCell(get_emails, "MessageNumber", "#msgs[i].getMessageNumber()#");
querySetCell(get_emails, "date", "#msgs[i].getSentDate()#");
If get_emails is dumped, a query object with the same properties will be
shown, and better yet, if you need to add any other thing to the query
object you may use any of the methods in the “msgs” function too right
there to simplify things.
Good Luck.El miércoles, 9 de noviembre de 2016, 15:08:57 (UTC-6), Javier Roque escribió:
Working in a Coldfusion to Lucee migration, i encountered a problem in the
javax.mail versions, apparently
Coldfusion used “mail.jar” for mail sending processes including cfpop,
(file which is not included at all in lucee directory).
Instead, I found out there is another file called
javax.activation…jar file inside the bundles directory.
Since the exception type is: “javax.mail.AuthenticationFailedException”
I proceded tu decompile both files and found that inside the mail directory
2 files were missing in the javax.activation…jar that were included in
inside the first .java file, USER and other functions are declared.
Question is, is anybody else having this issue? CFPOP is unusable becasue
tried just replacing both jar files by renaming them and whenever Lucee is
restarted, it installs the old javax.activation file again without the
missing .java files.
Has anybody found a work around for this or is there anyway to add this
java files to the JAR file? perhaps just pointing out specifically which
.Jar to use in the configuration
Thanks in advance!