Closed ajbeaven closed 1 year ago
Hmm, I see that the portal complains if you try to send an API-created campaign that specified a sender id but no name, so the id-only constructor won't work. Seems like the portal also doesn't adhere to the documentation! I'll leave it to you to assess how this should be handled :)
Fixed in latest release - v4.0.2 kindly refer the latest version.
The documentation for
CreateEmailCampaignSender
states:At present, this library requires you to specify the sender 'email' or else it fails with an
InvalidDataException
in the constructor. It's not currently possible then, to use this library to create a sender with anid
as if you send through aCreateEmailCampaignSender
with both the 'email' and 'id' specified, the API replies with a failed response:This PR updates the
CreateEmailCampaignSender
so that it complies with the documentation and the API requirements. There are now two constructors forCreateEmailCampaignSender
, one for instantiating a sender based onid
and another based onemail
andname
. This should help clear up any ambiguity and will allow you to use the library to create a sender on the basis of id as per the documentation.