WebService method newEmailMailing does not work as specified
Posted: Tue Feb 03, 2009 10:51 pm
Regarding ID 2549858 in the SourceForge bugtracker, there is a second difference between the documentation and actual function. Documentation states:
I think there is fault in the code. I propose the following change in EmmWebservice#newEmailMailing from: ("if no template used and mailinglist id is set in SOAP-call then set new mailinglist ID to SOAP parameter")
to: ("if no template used OR mailinglist id is set in SOAP-call then set new mailinglist ID to SOAP parameter")
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
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