[
https://issues.apache.org/jira/browse/IMAP-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995543#comment-12995543
]
Jeff Huff commented on IMAP-257:
--------------------------------
I don't think it is in the JPA code, I switched to the memory mailstore in
mailbox.xml and the same issue.
If I turn on mail.debug = true in the properties that I connect with in the
simple case from the Description of the issue, I see that the From is sent to
the IMAP processor...
DEBUG: JavaMail version 1.4.4
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name:
{com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun
Microsystems, Inc],
com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc],
com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun
Microsystems, Inc],
com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun
Microsystems, Inc],
com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun
Microsystems, Inc],
com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
Microsystems, Inc]}
DEBUG: Providers Listed By Protocol:
{imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun
Microsystems, Inc],
imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun
Microsystems, Inc],
smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun
Microsystems, Inc],
pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
Microsystems, Inc],
pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun
Microsystems, Inc],
smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc]}
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: getProvider() returning
javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems,
Inc]
DEBUG: mail.imap.fetchsize: 16384
DEBUG: mail.imap.statuscachetimeout: 1000
DEBUG: mail.imap.appendbuffersize: -1
DEBUG: mail.imap.minidletime: 10
DEBUG: trying to connect to host "localhost", port 143, isSSL false
* OK JAMES IMAP4rev1 Server Server 169.254.53.191 is ready.
A0 CAPABILITY
* CAPABILITY IMAP4rev1 LITERAL+ CHILDREN IDLE NAMESPACE UIDPLUS UNSELECT
A0 OK CAPABILITY completed.
DEBUG: protocolConnect login, host=localhost, user=jhuff@localhost,
password=<non-null>
A1 LOGIN jhuff@localhost carefx
A1 OK LOGIN completed.
A2 CAPABILITY
* CAPABILITY IMAP4rev1 LITERAL+ CHILDREN IDLE NAMESPACE UIDPLUS UNSELECT
A2 OK CAPABILITY completed.
A3 LIST "" Drafts
* LIST (\HasNoChildren) "." "Drafts"
A3 OK LIST completed.
DEBUG: connection available -- size: 1
A4 SELECT Drafts
* FLAGS (\Answered \Deleted \Draft \Flagged \Seen)
* 1 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1265750761]
* OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen)]
* OK [UIDNEXT 8]
A4 OK [READ-WRITE] SELECT completed.
A5 FETCH 1 (UID)
* 1 FETCH (UID 7)
A5 OK FETCH completed.
UID=7
A6 APPEND Drafts (\Draft) {368+}
From: Jeff Huff <jhuff@localhost>
Message-ID: <938857350.1.1297893791052.JavaMail.jhuff@localhost>
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_0_233814070.1297893791029"
------=_Part_0_233814070.1297893791029
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
------=_Part_0_233814070.1297893791029--
* 2 EXISTS
* 1 RECENT
A6 OK [APPENDUID 1265750761 8] APPEND completed.
MessageUID=8
A7 CLOSE
A7 OK CLOSE completed.
DEBUG: added an Authenticated connection -- size: 1
DEBUG: connection available -- size: 1
A8 SELECT Drafts
* FLAGS (\Answered \Deleted \Draft \Flagged \Seen)
* 1 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1265750761]
* OK [UNSEEN 1]
* OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen)]
* OK [UIDNEXT 9]
A8 OK [READ-WRITE] SELECT completed.
A9 UID FETCH 8 (UID)
* 1 FETCH (UID 8)
A9 OK FETCH completed.
com.sun.mail.imap.IMAPMessage@39617189
A10 CLOSE
A10 OK CLOSE completed.
DEBUG: added an Authenticated connection -- size: 1
A11 LOGOUT
* BYE IMAP4rev1 Server logging out
A11 OK LOGOUT completed.
DEBUG: IMAPStore connection dead
DEBUG: IMAPStore cleanup, force false
DEBUG: IMAPStore cleanup done
> appendMessages(Message[]) does not save the from address
> --------------------------------------------------------
>
> Key: IMAP-257
> URL: https://issues.apache.org/jira/browse/IMAP-257
> Project: JAMES Imap
> Issue Type: Bug
> Reporter: Jeff Huff
>
> Creating a new empty message in a Drafts folder stopped saving the from
> address when calling appendMessages(Message[]).
> InternetAddress addr = new InternetAddress ("jhuff@localhost",
> "Jeff Huff");
> Message message = new MimeMessage(session);
> message.setFrom (addr);
> message.setFlag (Flags.Flag.DRAFT, true);
> message.setText ("");
> message.saveChanges ();
> messageUID = drafts.getUIDNext ();
> drafts.appendMessages (new Message[] { message });
> System.out.println("MessageUID=" + messageUID);
> Yet if you add a call to setSentDate(new Date()); on a MimeMessage right
> after setFrom, it will set the From address. I have tried calling other
> methods to get it to refresh the headers, but nothing else seems to cause the
> from address to stick when added to the folder.
> This was working in M2.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]