on 06-27-2013 5:38 AM
Hello All,
I am using the following java mapping to create 2 separate attachments . But unfortunately I am getting the same attachment with content as :(This is the first file) twice in my email .
I want to get two separate files : file 1 -> This is the first file in the email attachment.
file 2 -> This is the 2nd file.
OutputAttachments outputAttachments = arg1.getOutputAttachments();
OutoutAttachments outputAttachments1 = arg1.getOutputAttachments();
Attachments attachments = outputAttachments.create("1","text/plain","This is the first file".getBytes());
Attachments attachments1 = outputAttachments1.create("2",tex/plain","This is the 2nd file".getBytes());
outputAttachments.setAttachment(attachments);
outputAttachments1.setAttachment(attachments1);
Regards
Vinay
Hello,
Can you try:
OutputAttachments outputAttachments = arg1.getOutputAttachments();
Attachments attachments = outputAttachments.create("1","text/plain","This is the first file".getBytes());
attachments = outputAttachments.create("2",tex/plain","This is the 2nd file".getBytes());
outputAttachments.setAttachment(attachments);
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this
.
.
Attachment att2 = out.getOutputAttachments().create("content id1","text/plain;charset=\"UTF-8\";filename=\"attch1.txt\"","first attachment".getBytes());
Attachment att2 = out.getOutputAttachments().create("content id2","text/plain;charset=\"UTF-8\";filename=\"attch2.txt\"","second attachment".getBytes());
out.getOutputAttachments().setAttachment(att1);
out.getOutputAttachments().setAttachment(att2);
.
.
Thanks,
Anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.