As reported in 2549858 the code does not do this for emailSender. Today I found out that it also does not follow the documented behavior for the mailinglistID parameter. mailinglistID is always taken from the template if a template is used, even if the SOAP-parameter is != 0.The values for mailinglistID, targetID and emailSender will be taken from the template in case you set them to 0 and "" (empty string for emailSender) respectively.
I think there is fault in the code. I propose the following change in EmmWebservice#newEmailMailing from:
Code: Select all
if(aMailing.getMailTemplateID() == 0 && mailinglistID != 0) {
aMailing.setMailinglistID(mailinglistID);
}
to:
Code: Select all
if(aMailing.getMailTemplateID() == 0 || mailinglistID != 0) {
aMailing.setMailinglistID(mailinglistID);
}
That way the new mailing will have it's mailinglist ID set from the SOAP parameter according to the documentation.
My use-case: I am trying to create a number of new mailings from a template via SOAP. The resulting mailings should not always be tied to the same mailinglist as the template.
What do you think?
Regards,
Martin