def OnSauverEnvoyer(self, event):
        self.OnSauverUnitaire(event)
        if self.document_generated:
            if self.modifications.multi is not False:
                simple_modifications = self.modifications.get_simple_modifications(self.oo_filename)
                emails = '\n'.join(
                    [" - %s (%s)" % (modifs.email_subject, ", ".join(modifs.email_to)) for filename, modifs in
                     simple_modifications])
                if len(emails) > 1000:
                    emails = emails[:1000] + "\n..."
                dlg = wx.MessageDialog(self, "Ces emails seront envoyés :\n" + emails, 'Confirmation',
                                       wx.OK | wx.CANCEL | wx.ICON_WARNING)
                response = dlg.ShowModal()
                dlg.Destroy()
                if response != wx.ID_OK:
                    return

                for filename, modifs in simple_modifications:
                    if self.pdf:
                        oo_filename = filename
                        filename, e = os.path.splitext(oo_filename)
                        filename += ".pdf"
                    try:
                        SendDocument(filename, modifs)
                    except Exception as e:
                        dlg = wx.MessageDialog(self, "Impossible d'envoyer le document %s\n%r" % (filename, e),
                                               'Erreur', wx.OK | wx.ICON_WARNING)
                        dlg.ShowModal()
                        dlg.Destroy()
            else:
                try:
                    SendDocument(self.filename, self.modifications)
                except Exception as e:
                    dlg = wx.MessageDialog(self, "Impossible d'envoyer le document %s\n%r" % (self.filename, e),
                                           'Erreur', wx.OK | wx.ICON_WARNING)
                    dlg.ShowModal()
                    dlg.Destroy()