title: How to tackle emails failed to send after commit database php
body: <p>The case is I am calling a function which makes changes in DB and return list of users to whom I have to send emails.
  If my db have made changes and selected users and due to some reason emails were not send and users are not informed from changes.
  How to make sure that emails were sent after making changes in DB and if emails were failed to send what action should be taken.</p>