[ 
https://issues.apache.org/jira/browse/IMAP-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995511#comment-12995511
 ] 

Jeff Huff commented on IMAP-257:
--------------------------------

Yes, the same message is sent via Transport.send() is then appended to the Sent 
folder.  The message received to the inbox that was sent has three additional 
headers that the one saved to the Sent folder does not: Return-Path, From, and 
Received.  When I look in the JPA tables in the database, james_mail_header, I 
can see that the Sent mail does not have the from address.  The return-path and 
received are probably added by the server on delivery.

It is looking like any call to appendMessages(Message[]) does save the from 
header to the database.  I am looking through the StoreMessageManager code to 
see how it works.

> 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]

Reply via email to