Page 1 of 1

How send an email to recipient with individual attachment

Posted: Wed May 25, 2016 9:36 am
by ashok.gosavi
Requirement: How to send out an email to multiple receivers/recipients with individual attachment :?:
Case: Target Group (Distribution List) contains 1000 of email ids and everybody should get individual PDF(or any other extension) document. The documents are already generated and placed at shared path.

What I have done: Currently I am having less no of email ids in Target Group, consider 2 email ids. So when I create mailing and click on Send, openemm generates .xml with details like single attachment data, 2 receivers in <receivers> block, and other needed info.

#Approach 1: "Read the single xml and generate the receiver specific xmls" (works for less no of email ids)
I have done java code change which reads the generated xml using DOM (which loads the xml in memory) and creating fresh .xmls for individual receiver with replacing existing attachment data with receiver specific document/attachment data and <receivers> block with single receiver only.
This works fine but for less no of email ids. The issue with this is when we have large no of email ids this approach is not feasible as DOM loads the xmls in memory and it will definitely go in OutOfMemory error.

#Approach 2: Change java code to generate the receiver/individual xml generation with their attachment. (Required approach)
I tried multiple ways to achieve this but could not succeed :x as I am not much clear with what are the changes required and where to do the exact changes. :(

Request you to please help me with this or alteast provide some pointers :idea: on this.

Re: How send an email to recipient with individual attachmen

Posted: Fri May 27, 2016 11:33 am
by ashok.gosavi
Or tleast provide me any other best approach to implement sending individual email with individual attachment to the receivers

Re: How send an email to recipient with individual attachmen

Posted: Thu Jan 12, 2017 3:15 pm
by antoinec52
Hi, i've got the same problem and i would know if you find any solution?