-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mail sending appears to not handle multiple "to" addresses properly #338
Comments
Do you have a sample MIME output that produces the issue? |
Not yet - so far, that report from chat is the entirety of my information. |
From a followup: ======= In the MimeMessage, we created To field as below. Then we use JNAMimeWriter.writeMime() to create a Notes document by the MimeMessage. The "sendTo" field of Notes document we created is not correct(see below). It should have 2 elements not one element with 2 email addresses in it. |
I added a test case for this: https://github.com/HCL-TECH-SOFTWARE/domino-jnx/blob/develop/test/it-domino-jnx/src/test/java/it/com/hcl/domino/test/mime/TestMimeReadWrite.java#L223 . However, it seems like it works properly there, where calling |
On further investigation, I believe this to be a problem on the app side. The value is being read via |
As an alternative I think there is an open flag to convert RFC822 items, but then the doc should not be saved. |
That makes sense too. The new method I added should be convenient for already-open notes, and either way I'll leave this open just for a bit for confirmation from their side that this is the problem. |
From the report:
====
When we use KEEP PIM endpoint /message to send mail, if there are 2 mail addresses in "To" or "CC" fields, the mail could not be delivered. In KEEP code, we constructed a MimeMessage first and then call JNX api to generate a Notes mail document according to the MimeMessage. Finally, JNX C code will do the work. I believe that JNX code does not handle the multiple values of mail addresses correctly.
// Create Mime message
final MimeMessage mime =
CreateMessage.createMimeMessage(payload.getString("from"), payload.getJsonArray("to"),
payload.getJsonArray("bccto"), payload.getJsonArray("copyto"),
payload.getString("subject"), body,
payload.getJsonObject("body").getString("content-type"));
final Document note = request.db.createDocument();
request.session.writeRawMIME(note, in);
public class JNAMimeWriter extends JNAMimeBase implements MimeWriter {
@OverRide
public void writeMime(Document doc, String itemName, InputStream in, Set dataType) throws IOException {
IOException[] ioEx = new IOException[1];
The text was updated successfully, but these errors were encountered: