I have a few questions about the pop3 plugin:
1.) I have a method that only downloads the headers. That is working fine.
Now i have the following method, that must only download the current mail:
- Code: Select all
var recieveMode = 1;//0=FULL,1=HEADERS_ONLY,2=NO_ATTACHMENTS
var msgs = plugins.mail.recieveMail(p_username, p_password, true,recieveMode, senddate);
senddate is a column with the Senddate in it.
But I'll get the following error:
- Code: Select all
java.lang.ArrayIndexOutOfBoundsException
What am I doing wrong?
2.) When I do this: (sample code)
- Code: Select all
var attachments = msg.getAttachments()
if (attachments != null)
{
for (var j = 0 ; j < attachments.length ; j++)
{
var attachment = attachments[j]
//application.output(attachment.getName())
var attachmentDataByteArray = attachment.getData()
//write attachmentDataByteArray to a file...
}
}
Does that mean, that when I do this in a client, that an attachment of about 4MB, is first downloaded to (the client) variable: attachments and if I put it in the database, is the whole 4mb uploaded again??
3. In (for example) Outlook there is a function, that you can keep messages on the server for let's say: 20 days.
Is this standard email-functionality, or is it something that only Outlook does?
4. Jan, you said that there was no unique emailnumber. In almost all the pop3 beans you find something like this:
elements.bean_680.getMessageUID(number) or
elements.bean_680.getNoOfMessage()
Now we have to download always all the headers, to determe how many emails there are, en determe which emails must be downloaded.
If there are 20 message, this is not a problem, but if there are 100, this is a problem.
A customer of us is using pop3/imap server. The imap-server is reachable by a webbrowser too. So if we do a pop3 session, we must leave the message on the server, because else the message would not be seen in the (imap) webbrowser.
Is there an easier (less overhead) way to do this?
5.) In the debugger I see also function, like: notify and notifyAll
What does that do?
6.) Why is the getReceivedDate() always empty?? (returning null)