Open hb7777 opened 7 years ago
@hb7777 Had you look at PR #4, i already some big upgrades to the bundle in there.
Command
send()
return a Promise()
so if the long running operation could complete asynchronously.sent()
message, which failed ? or succeed ?@sadortun
The point 3. You need to be able to handle results for each sent() message, which failed ? or succeed ?
Is crucial, but from my test with the Mandrill mailer, we do get back, a detail returned object, detailing for each user sent to them the status of the mail (sent, queued, rejected, etc..) and also a unique ID to do follow up inquiries like (mail was open, etc..), The batch processing only works if we can track the outcome per individual user.
@sadortun was personalization when sending (email, sms) also addressed in that PR ?
@hb7777 yes, but since SMS are not in our roadmap for a few more months, we have not made a sms transport, but it should be fairly easy to add. We currently support 12 providers in a other project, and we can reuse the code here
This is our current Email.sparkpost implementation
https://github.com/SDDProductions/SDDSparkPostTransportBundle
@hb7777 there is a few weeks of work around this PR, there is a few internal improvement to do, but it otherwise production ready.
I would be happy if you could do a code review, I am sure there is a few things to improve. Currently it working well in this state, but there is many pending improvements that will come in a few weeks since we currently have more immediare priorities.
mail ()
transportsend (array)
that return a Promise ()
To that end.
All classes implementing those interfaces were changed.
Next the communicationBundle Manager classes were changed to passed a collection of message and a template.
This is an example of the a json structure to be transformed into a specific SDK personalization structure. Each third-party have their own format structure, so this should tie to an sdk transport bundle.
Third-Party API data transformation from the json above
Created the class Ds\Bundle\TransportBundle\Collection\MessageCollection that extends ArrayCollection to contain all Ds\Bundle\TransportBundle\Model\Message classes passed to the transport specific class.